Hi!
I have a form working and in the login section I also give the option to register in case someone hasnt done so yet. This will show another form which, on submit, will use a different .php page.
Now on that page,if register is successful, I'd like it to change a field value on the initial page but I haven't been able to do so. It would be basically taking a field off from hiding and displaying a message for user feedback letting him know it worked.
I have tried this
function conf($fld,$message) {
echo '<script language=\'JavaScript\' type=\'text/JavaScript\'>
var field = document.getElementById("'.$fld.'");
field.value = "'.$message.'";
</script>';
}
(...)
if($result) {
header("location: ../Llog.php");
conf('msg',"You have been successfully registered but you will need admin approval");
exit();
}else {
die("Query failed");
}
but has expected as soon as it changes page it doesn't do anything else that follows.
Should I do something like header("location: ../Llog.php?id=1"); and make a catch on that? I dont really like those sort of solutions but cant think of anything else, hopefully is just me not being able to look outside the box
Thanks for reading