Register Gobals and Arrays?
Posted: Thu Feb 24, 2005 6:23 pm
This is my code:
My only problem is register globals... I tried adding this:
But I get an error. Can anyone shed some light on this?
Cheers.
Code: Select all
<?php
if ($_POSTї'submit']) {
//check each customї] field
foreach($custom as $check) {
if ($check == "") {
$err = "yes";
}
}
if ($err) {
//display error
echo "Error";
} else {
//display thankyou page
echo "All fields entered";
}
} else {
?>
<form action="errorcheck.php" method="post">
<input type="text" name="customї1]"><br>
<input type="text" name="customї2]"><br>
<input type="text" name="customї3]"><br>
<input type="submit" name="submit" value="Submit">
</form>
<?php
}
?>Code: Select all
foreach($HTTP_GET_VARSїcustom] as $check) {Cheers.