aaron4osu — 2012-10-01T21:55:39-04:00 — #1
I'm trying to pass a value stored in a hidden field in a form over to my php script, but can't seem to get it to work.
<form action='scripts/proc_email_form.php' method='post' name='form' id='form' accept-charset='utf-8'>
<input type='hidden' name='unreguser' value='4' id='unreguser' />
<textarea name='message' rows='8'></textarea>
<input type='submit' value='Send' />
$unreguser = $_REQUEST['unreguser'];
I have also tried using $_POST
nichemtktg — 2012-10-01T22:28:33-04:00 — #2
What specifically's the problem?
ralphm — 2012-10-02T00:36:29-04:00 — #3
Seems like it should work, so there must be something else going on. Could you post more of your PHP?
cups — 2012-10-02T06:29:30-04:00 — #4
At the top of that script temporarily add these lines:
echo '<hr />';
That is where is should appear.
aaron4osu — 2012-10-02T08:09:11-04:00 — #5
Thanks that helped me find the error. It was grabbing the variable but when I tested it by echo the variable i left off the $ in front of the variable.
cups — 2012-10-02T08:44:21-04:00 — #6
Yup, happens all the time. Thanks for taking the trouble to explain to others what the cause was, and what helped you find it.
system — 2014-10-07T22:59:22-04:00 — #7
This topic is now closed. New replies are no longer allowed.