Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
ASP coding help for an e-commerce site.?
This form posts to paypal. The amount field in the form at the moment just pulls price from the database and then sends it on, however I want to bring into play discounts so if the person enters the right code '10pct' in the discount field then i can then pass a different 'amount' to paypal. For the time being I want the site to send paypal "4"if the discount code is in place and "3" otherwise...
Discount</td><td>
<input type="text" name="discount" size="15"></td>
</tr>
</table>
<% dim strfinalprice %>
<% If request.form("discount") = "10pct" then 'strfinalprice' = 4
else 'strfinalprice' = "3"
end if
%>
<input type="hidden" name="amount" value="<%response.write ("strfinalprice")%>">
So far all I've managed to do is get paypal telling me to give them a number higher than 0. Anyone here able to tell me what I need to do to fix it?
1 Answer
- Anonymous1 decade agoFavorite Answer
My guess is that you shouldn't have quotes around the strfinalprice variables.