![]() |
Passing Variables through Form
Okay, I've got a form with yes/no buttons. To access this form I use misc.php?do=unsubscribe&id=1, where id=1 is the userid being unsubscribed. Now, after the user chooses to continue and unsubscribe, I need to remove their subscription using their userid. My problem is that after the user continues, the &id=1 variable is lost -- so the query cannot run. How can I get the &id=1 to pass along?
|
PHP Code:
HTML Code:
<input type="hidden" name="userid" value="$userid" /> |
It's still not continuing along.
|
It will send it with your form data...
|
So I should be able to use $userid as it continues to the dounsubscribe page, right?
|
$_GET['userid'] or $_POST['userid'], depending on your form method.
|
Oh, I thought I used the cleaned variable.
|
You should clean it... just as you clean the other data coming from the form.
$userid is just ?id=X being generated into the form HTML. From there on it's just a regular form element. |
Yeah I realize that, but the code you provided cleaned it -- that's what I'm using.
|
All times are GMT. The time now is 06:30 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|