The Arcive of vBulletin Modifications Site. |
|
session id in hidden form input Details »»
|
|||||||||||||||||||||||||
I want to submit the session id in a hidden input form field.
I've tried several variables, but they all lead me to a page with an invalid session error. I've even tried leaving it out. This is not being done through a template, but through a php file. What's the correct value? Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Basically in vB files the session hash is $session['sessionhash']. vB doesn't use PHP4's session handling do son't try using functions like session_id().
|
|
#3
|
|||
|
|||
|
yeah I tried that like
value=\"$session['sessionhash']\" and value='".$session['sessionhash']."' but they both made invalid sessions |
|
#4
|
||||
|
||||
|
What do you mean "invalid sessions"? What kind of error did you get?
BTW in the first line you don't need ' inside the [] brackets. |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
Is the referring page part of vBulletin? i.e is the $session array available there?
|
|
#7
|
|||
|
|||
|
yes it's part of vbulletin (template: error_invalidsession)
I'm starting to think it's because the 'form' that is submitting is actually being included through php onto the main page. maybe I need to specify a s=$session['sessionhash'] in the url of the include? |
|
#8
|
|||
|
|||
|
oh but no, the script with the form on it is my own creation. I thought it would inherit the session id of the page it was being included on.
|
![]() |
|
|