Current location: Hot Scripts Forums » General Community » Script Requests » Protecting hidden field on HTML Form with PHP


Protecting hidden field on HTML Form with PHP

Reply
  #1 (permalink)  
Old 08-22-04, 02:10 AM
imlek imlek is offline
New Member
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Protecting hidden field on HTML Form with PHP

Hi,

I'm using HTML Form to send information of my visitors (Visitor submit this form directly) to destination.com as follow:

<form name="form1" action="http://destination.com/receiver" method="post">
<input type="hidden" name="Login" value="My-Username">
<input type="hidden" name="Passwd" value="My-password">
<input type="hidden" name="Cust" value="John Doe">
<input type="hidden" name="Total" value="100">
<input type="submit" value="Submit">
</form>

This HTML Form is the only method that destination.com can accept.

But this is very big security issue, since people can use 'View Source' and get my login and username.

How to protect my login and password from being viewable to the world but the form still work ? May be hide it somewhere? Or other method?

Please advice.

Thank you.
Reply With Quote
  #2 (permalink)  
Old 08-22-04, 09:19 AM
bugalyzer bugalyzer is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
forms

You should never create a form like this with the password hidden in it .. Simply create a login page which authenticates against the destination server and then set a cookie or session variable - or simply trust the information to begin with and send it to the destination site.

It looks like your trying to capture some user info before you send off the request for someone to pay for something correct? If this is the case - most online payment sites (paypal etc.) can send a confirmation email or http post which allows you to capture transaction information.

http://buildacom.com
Reply With Quote
  #3 (permalink)  
Old 08-22-04, 11:01 PM
imlek imlek is offline
New Member
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for all the advice guys.
Your advices clear my sky.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
formmail problem gscraper Perl 12 08-27-04 03:06 AM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 11:19 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
saving data with PHP form sXenoGJ PHP 4 04-30-04 11:25 PM
php form to html file arnec PHP 1 01-21-04 10:14 AM


All times are GMT -5. The time now is 10:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.