Welcome! Log In Create A New Profile

Advanced

TOPIC 4B-1

Posted by Johlene 
Announcements Last Post
Announcement myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
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
TOPIC 4B-1
August 11, 2006 09:11AM
grinning smiley VERY INTERESTING - COMPLETED
Re: TOPIC 4B-1
August 23, 2006 09:14AM
Completed.
Re: TOPIC 4B-1
September 11, 2006 11:07AM
Completed.

Question:
How does one display errors on the page where the data is being entered? At the moment, a new page is being displayed with the error messages and the user has to use the [Back] button to go to the form to correct these errors.
avatar
Mac
Re: TOPIC 4B-1
September 11, 2006 11:47AM
You can use Javascript (not part of this course though) - lots of free code is available that will handle that. A PHP way is to check on the next page if any variable is empty, in which case you send the user back to previous page (or a new page) together with the rest of the variables that was indeed sent, which is then available to echo in the form.

The Javascript engine is built into the browser, therefore it can evaluate a page before the page is being sent to a server. PHP sits on the server, therefore the page is only evaluated once it reaches the server. Thus you have to work with two pages.
lad
Re: TOPIC 4B-1
September 12, 2006 11:39AM
Topic completed.
Re: TOPIC 4B-1
September 13, 2006 09:31PM
Topic 4B-1 completed.
Re: TOPIC 4B-1
September 17, 2006 09:11PM
4B1 completed
Re: TOPIC 4B-1
September 18, 2006 08:05PM
Completed! Client side scripting really helps with form validation!
avatar Re: TOPIC 4B-1
September 21, 2006 08:46PM
done
avatar
Mac
Re: TOPIC 4B-1
September 28, 2006 03:34PM
Just a reminder that Javascript has some security issues - do a Google for more info. PHP itself, by the way, also has some distant security issues, especially when using forms. Be aware and do a Google search for more info.
Sorry, only registered users may post in this forum.

Click here to login