Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 05-21-2005, 04:52 PM Form Values
Bloodsyne's Avatar
Skilled Talker

Posts: 52
Trades: 0
How can I make it so that when someone gets an error while registering an account on my site and clicks the 'back' button to fix an error, the values they previously had are still present?

I thought they did so automatically, but... I guess not?
Bloodsyne is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-21-2005, 07:27 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
One way is to use ASP.NET - it automatically maintains the viewstate, and handles client and server side validation very easily.

www.asp.net
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-22-2005, 01:19 AM
drewrockshard's Avatar
Super Talker

Posts: 100
Name: Drew
Location: Garland (Dallas), Texas
Trades: 0
...or you could just use javascript to do a form validation. so when the user puts the wrong info in, the user is noted (alerted) before they even submit the form.
__________________
Best Regards,
Drew Decker

Please login or register to view this content. Registration is FREE
drewrockshard is offline
Reply With Quote
View Public Profile
 
Old 05-22-2005, 09:02 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
If possible, you should put server side validation in as well. Javascript validation can be circumvented very easily, so if you're validating for malicious code, or something that could have an adverse effect on your application, you should always implement server side validation.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 05-22-2005, 08:13 PM
Bloodsyne's Avatar
Skilled Talker

Posts: 52
Trades: 0
Well, it's all handled by PHP right now. The security factor is pretty low because I haven't implemented all of the required checks yet, so on and so forth...
Bloodsyne is offline
Reply With Quote
View Public Profile
 
Old 05-22-2005, 08:30 PM
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
In all the form values, give each the corresponding POST values. For eg, for a form element named "username", give the element a value="<?php if(isset($_POST['username'])){ echo $_POST['username']; } ?>"

Also at the top of the page, include:

header("Cache-control: private");

This will help stop IE from clearing the cache. Be aware of javascript validation for forms that do database insert queries. In some cases the header is sent twice which results in a double insert; a very, very annoying bug which happens with all browsers.
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.

Last edited by metho; 05-22-2005 at 08:34 PM..
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Reply     « Reply to Form Values
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 4.33990 seconds with 12 queries