Necrophyte
09-08-2016, 08:22 PM
Creating a form inside the php module.+
The form calls itself.+
Quick little snippet example
global $vbulletin;
if (!empty($_POST['sbutton'])){
Do some stuff, but we can't userid = 0 $vbulletin->userinfo['userid'] and even vB::getCurrentSession()->get('userid') returns 0
}else{
<form class='block' action='/forum/SituationReport' method='post' id='sitrep' name='sitrep'>
<input type='submit' class='button' name='sbutton' id='_save' value='Submit'>
}
On the submit. The session is lost.
I tried adding the normal loading scripts but I get
Couldn't read config file config.php
Which is typical if its already loaded (Or at least in my experience)
What else am I missing here. Script works outside of vbulletin as an external page.
--------------- Added 1473374738 at 1473374738 ---------------
@#%#@$%
Figure out cause I was calling ./global.php
I missed that.
The form calls itself.+
Quick little snippet example
global $vbulletin;
if (!empty($_POST['sbutton'])){
Do some stuff, but we can't userid = 0 $vbulletin->userinfo['userid'] and even vB::getCurrentSession()->get('userid') returns 0
}else{
<form class='block' action='/forum/SituationReport' method='post' id='sitrep' name='sitrep'>
<input type='submit' class='button' name='sbutton' id='_save' value='Submit'>
}
On the submit. The session is lost.
I tried adding the normal loading scripts but I get
Couldn't read config file config.php
Which is typical if its already loaded (Or at least in my experience)
What else am I missing here. Script works outside of vbulletin as an external page.
--------------- Added 1473374738 at 1473374738 ---------------
@#%#@$%
Figure out cause I was calling ./global.php
I missed that.