later on the process page i have this to send it back. (i have never had the php send it to itself I have always had it send to a process page. i never tried doing it the other way... instead I sometimes have ajax do the whole thing and send it to and from the process page)
$returndata = array( 'posted_form_data' => array( 'name' => $name, 'email' => $email, 'phone' => $phone, 'message' => $message, 'checkbox' => $checkbox), other stuff is here not in the array );
then i send this array back using a session
$_SESSION['cf_returndata'] = $returndata;
on the contact page I have $cf = $_SESSION['cf_returndata'].
so now it should be in $checkbox but when i then have this in the input of checkbox:
and then on a process php page i did this:
i put $checkbox into a session variable and then i set it to $checked back on the contact page and it won't work?
help
i echo'd $checkbox[1] an it gave me 'array'
Secondly, better way of checking input is:What is behind '$_SESSION' ?
i read that thats how its usually done.
i have 9 or 10 checkboxes
after i set
i send it back via $_session['returnData'] which held an array if things (name,email, etc...) and one of those things was an array of checkboxes.
and even if i try
i don't work
its always true and the checkmark is always there
If you only have one checkbox on the page though, DON'T name it an array.
have you tried:
Then see what is in that array.
ok
this is what i have on my process page after you press submit:
later on the process page i have this to send it back. (i have never had the php send it to itself I have always had it send to a process page. i never tried doing it the other way... instead I sometimes have ajax do the whole thing and send it to and from the process page)
then i send this array back using a session
on the contact page I have $cf = $_SESSION['cf_returndata'].
so now it should be in $checkbox but when i then have this in the input of checkbox:
i check echo $cf['posted_form_data']['checkbox'] agev back array.
and echo $cf['posted_form_data']['checkbox'][1] gave back an empty spot.
Put this in your page and copy into the thread what it dumps out
NULL
its like it lost all its contents?