Welcome!
Log In
Create A New Profile
Home
>
2011
>
PHP Sem 1
> Topic
Advanced
Keeping entered info on failed validation
Posted by
Shaun2010
Announcements
Last Post
SoC Curricula
09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment
02/13/2017 07:59AM
School of Computing Short Learning Programmes
11/24/2014 08:37AM
Unisa contact information
07/28/2011 01:28PM
Forums
Messages
New
Shaun2010
Keeping entered info on failed validation
April 30, 2011 07:35AM
Registered: 13 years ago
Posts: 263
Rating: 0
How can I stop a form from loosing the data inputted if the validation fails?
A word to the wise ain't necessary - it's the stupid ones that need the advice.
Student Number:72793775
Reply
Quote
wsbraun
Re: Keeping entered info on failed validation
April 30, 2011 08:35AM
Registered: 13 years ago
Posts: 60
Rating: 0
check section 4 page 9 of the first cd.
/html/php/php4p9.html
Basically with each text input box you need to add a value="<? echo $variable ?>"
for radio and dropdown boxes if it needs to be selected then use selected="selected" or checked="checked"
for text areas echo the data between the tags
--
Student Number: 7298-786-3
Reply
Quote
presub-72985224
Re: Keeping entered info on failed validation
May 06, 2011 04:37PM
Registered: 13 years ago
Posts: 25
Rating: 0
Use sessions, this way the data will be available until the user closes their browser or overwrite the session data.
session_start();
$_SESSION['sname'] = $_POST['sname'];
...value="<?php echo $_SESSION['sname']"...
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login