I’ve written code (below) of which receives posted fields data on to the acknowledgement page (Subscribe page > Acknowledge page), however the code is not working as expected so I’ve removed the other code (mainly the sanitizing of user input) and left the code were the users input is checked for empty spaces. This still isn’t working...I’m a rooky, so any help is much appreciated
if($\_POST\['username'\] === "" ||$\_POST\['userfirstname'\]=== ""|| $\_POST\['usersecondname'\]=== ""||$\_POST\['useremail'\]=== ""||$\_POST\['userpassword'\]=== ""||
$\_POST\['userpasswordr'\]=== "")
{
$arr\_fields = array("$\_POST\['username'\]", "$\_POST\['userfirstname'\]", "$\_POST\['usersecondname'\]", "$\_POST\['useremail'\]",
"$\_POST\['userpassword'\]", "$\_POST\['userpasswordr'\]");
foreach($arr\_fields as $arr\_field)
{
if($arr\_field == "")
{
$arr\_field = "missing";
}
}
$var\_username= $\_POST\['username'\];
$var\_userfirstname= $\_POST\['userfirstname'\];
$var\_usersecondname= $\_POST\['usersecondname'\];
$var\_useremail= $\_POST\['useremail'\];
$var\_userpassword= $\_POST\['userpassword'\];
$var\_userpassword\_repeat= $\_POST\['userpasswordr'\];
$arr\_fields\_processed = array("$var\_username", "$var\_userfirstname", "$var\_usersecondname", "$var\_useremail",
"$var\_userpassword", "$var\_userpassword\_repeat");
header ("location: subscribe.php?arr\_fields\_processed");
} else
{
//sanitize code...
}
:confused: