How to hide some html code?

Soldato
Joined
12 Jun 2005
Posts
8,395
If I wanted to hide some html code, mainly form stuff from people viewing it in the source code like this:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://www.paypal.com/en_GB/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Item 1">
<input type="hidden" name="item_number" value="#001">
<input type="hidden" name="amount" value="1.50">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="bn" value="PP-ShopCartBF">
</form>

How would I go about it? It's button code generated by paypal to use their shopping basket. I just don't like the idea of someone viewing the source code, saving it to their computer, editing the price, saving it and opening it on their desktop and completing a transaction with a lower price. I'm not concerned about proper hackers who would have a field day adding stupid orders, the main market for this website is far from it. Is there something simple I could add to the html just to hide the above code? Cheers for any help guys :)
 
In a word, impossible :D

Well, you could use the encrypted button option but you do lose some flexibility...Paypal will show you what's what during the button creation process.

Either way someone could POST info to Paypal with no problems regardless of what you do.

Which is precisely why one checks Paypal transactions before proceeding with the order, or uses Paypal's Instant Payment Notification system which will notify your website when transactions take place, and the relevant script on your site will then either match the payment with an order or ignore it :)
 
cheers guys for the replies :)

Thats quite a handy link, I'll give it a whirl and see how it goes.

Edit: Nevermind, I've just had a friend explain it to me. :)
 
Last edited:
Back
Top Bottom