Hello
I have a php page that checks the values of a html form. If some elements of the form are missing or have incorrect format, it will display messages to the user.
1. My checkform.php page contains a code like:
$missing1 = "The following fields are missing: ";
if ($key=='gender' && empty($val)) {
$missing1 .= " Gender; " ;
echo $missing1;}
if ($key=='address' && empty($val)) {
$missing1 .= "Home address; " ;
echo $missing1; }
// More checks of the same type
$togourl ="../errors.php?missing1=$missing1";
header("Location: $togourl");
2. In my errors.php I have:
<tr>
<td>
<?php
echo $_GET['missing1'];
?>
</td>
</tr>
1. The problem is that I only see one word in my errors.php, which is "The". When I remove the statement header("Location: $togourl") from my code, I see the missing1 var is correct (by checking echo in the code), but when displaying in second page I have a problem. Could you help me? Everything else (html) shows fine in the table of the second page.
2. What method you suggest so I store the missing fields in array and pass it on to errors.php and show it in several lines threre?
Many many thanks
Evrim