The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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?
|
#2
|
||||
|
||||
PHP Code:
HTML Code:
<input type="hidden" name="userid" value="$userid" />
|
#3
|
||||
|
||||
It's still not continuing along.
|
#4
|
||||
|
||||
It will send it with your form data...
|
#5
|
||||
|
||||
So I should be able to use $userid as it continues to the dounsubscribe page, right?
|
#6
|
||||
|
||||
$_GET['userid'] or $_POST['userid'], depending on your form method.
|
#7
|
||||
|
||||
Oh, I thought I used the cleaned variable.
|
#8
|
||||
|
||||
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. |
#9
|
||||
|
||||
Yeah I realize that, but the code you provided cleaned it -- that's what I'm using.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|