Forum Moderators: coopster
Got a class called a.php
has form in this class that user fills out
then presses submit button (thereofore is posting information called b.php)
Got another class called b.php
checks to see if the fields in the above class are empty with:
if ((empty($_POST['surname'])) ¦¦ (empty($_POST['forename'])))
{
what do i do here so it calls a.php posting back the information
for example if surname was filled with jones, it would reappear in the form again and teling the user that forname has been left empty.
hope u can help.
thanks in adavance
So a.php submits to a.php and only calls b.php if there is an error or a successful login, or whatever. But any validation, checking and so on is done by the page with the form. Then if there's a problem, you cna just put the values in.
Otherwise, you can
- use session vars
- use cURL functions
Tom