Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > HTML and JavaScript

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-22-2004, 08:18 AM   #1
imlek
Registered User
 
Join Date: Aug 2004
Posts: 2
Default Protecting hidden fields in HTML Form

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.
imlek is offline   Reply With Quote
Old 08-23-2004, 07:59 PM   #2
Curly Brace
Rock is alive!
 
Curly Brace's Avatar
 
Join Date: Jun 2004
Location: Russia
Posts: 603
Send a message via ICQ to Curly Brace
Default

If your destination.com accepts GET variables, you can try this code. I hope it could be clear without comments.

PHP Code:
<?php
if(isset($sub)){
    
header("Location: http://destination.com/form_reciever.php?login=blah&passw=blahblah&cust=$cust&total=$total");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>FORM</title>
</head>

<body>
<form action="<?php print $PHP_SELF ?>" method="post">
<input type="hidden" name="cust" value="John Doe">
<input type="hidden" name="total" value="100">
<input type="submit" name="sub" value="Submit">
</form>
</body>
</html>
Curly Brace is offline   Reply With Quote
Old 08-25-2004, 05:15 AM   #3
imlek
Registered User
 
Join Date: Aug 2004
Posts: 2
Default Thanks

Thanks a lot.
imlek is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:51 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.