Announcements Last Post
Announcement : Programming Students at UNISA School of Computing 06/19/2019 02:01PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Keeping entered info on failed validation
April 30, 2011 07:35AM
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
Re: Keeping entered info on failed validation
April 30, 2011 08:35AM
check section 4 page 9 of the first cd.


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
Re: Keeping entered info on failed validation
May 06, 2011 04:37PM
Use sessions, this way the data will be available until the user closes their browser or overwrite the session data.


$_SESSION['sname'] = $_POST['sname'];

...value="<?php echo $_SESSION['sname']"...
Sorry, only registered users may post in this forum.

Click here to login