Page 1 of 1

Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 1:25 am
by smashhell
Hello, I need help. I tired searching but came out with no solution.
I am trying to build a shopping cart where it sends shipping and payment information to Paypal through a form.
But I don't want the user or anyone to be able to see those information.

The problem is that I couldn't hide the information. Anyone can just use "View Source" to see what I am sending in the form fields.
Are there anyway to hide the values so that no one can see them ?
Please Help :(

Here are my code:

Code: Select all

<form action="cart.php" method="post">
<input type='hidden' name= 'selResidential' value='<?php echo $resdiential; ?>' />
<input type='hidden' name= 'selPackaging' value='<?php echo $packaging; ?>' />
<input type='hidden' name= 'selRate' value='<?php echo $rate; ?>' />
<input type='hidden' name= 'txtFromZip' value='<?php echo $fromzip; ?>' />
<input type='hidden' name= 'txtFromCity' value='<?php echo $fromcity; ?>' />
<input type='hidden' name= 'txtFromCountry' value='<?php echo $fromcountry; ?>' />
<input type='hidden' name= 'txtToZip' value='<?php echo $tozip; ?>' />
<input type='hidden' name= 'txtToCity' value='<?php echo $tocity; ?>' />
<input type='hidden' name= 'txtToCountry' value='<?php echo $tocountry; ?>' />
<input type="submit" value="Submit" />
  </form>
Even if they are hidden forms, the user can just "View Source" and see all the values. :(

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 3:36 am
by social_experiment
You have to use javascript for this and even then it's not a sure thing because not everyone has javascript enabled on their browsers.

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 3:47 am
by smashhell
social_experiment wrote:You have to use javascript for this and even then it's not a sure thing because not everyone has javascript enabled on their browsers.
Oh, I do not know how to code javascript.
There isn't any other way ?
Surely there must be a secure way to transmit those data. :(

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 3:57 am
by social_experiment
I'm not aware of another way to hide those values, Javascript works because it is client-side (on the browser). If you want to transfer the information securely you should use an SSL connection.
smashhell wrote:Anyone can just use "View Source" to see what I am sending in the form fields.
This will be a person sending the information viewing their own information wouldn't it?

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 4:37 am
by smashhell
social_experiment wrote:This will be a person sending the information viewing their own information wouldn't it?
Some of it are their own information, but I have some payment information that I don't want the user to see.

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 6:15 am
by kailash.lambe
Send data through CURl, try it..

Re: Are there anyway to hide form values ?

Posted: Wed Dec 01, 2010 7:55 am
by Bind
You can use SSL and a database instead of including them in hidden inputs when chaining multiple page forms or develop more efficient form and processing code so multiple forms are not required.

I have been coding apps for paypal payments for a while now and I have never seen the requirement to send paypal ANY customer information other than the Instant Payment Notification requests through their IPN API for automated payment confirmations, considering the customer enters all the information paypal needs when they make the purchase on the paypal payment pages. Your post doesnt make much sense to me in that regard when you claim the need to send paypal customer information.