Hi,
I have tried changing GET to POST and now it just reloads the form and will not execute what it is supposed to do. If I change it back everything works fine but still takes me to the login screen cos it does not recognise the session id as being there.
This is the way the form looks when it is fully working, but redirects me to the login page as session id is not present:
Code: Select all
<form method="GET" action="<?php echo $PHP_SELF;?>">
<input type="text" size="12" maxlength="12" name="value" class="text"><p>
<input type="submit" value="submit" name="submit" class="grab">
</form>
The form gets a number from the user, then that number is saved as a string value, that string value is used to perform an action then the action is saved into a .php file.
This is the first way I tried by adding the session id:
Code: Select all
<form method="GET" action="<?php echo $PHP_SELF;?>?sessionid=<?php echo $sessionid; ?>">
<input type="text" size="12" maxlength="12" name="value" class="text"><p>
<input type="submit" value="submit" name="submit" class="grab">
</form>
This does perform the php script that I need it to do, but then redirects me to the login page as it is not recognising the session id in the action of the form.
Then I tried to change GET to POST:
Code: Select all
<form method="POST" action="<?php echo $PHP_SELF;?>?sessionid=<?php echo $sessionid; ?>">
<input type="text" size="12" maxlength="12" name="value" class="text"><p>
<input type="submit" value="submit" name="submit" class="grab">
</form>
Now the form just reloads itself and stops the page from acting on the string value saved and stops the file save action.
The top one displays in the address bar when I click submit: /updatemembers.php?value=45605&submit=Update
I think it has something to do with that because I am trying to add a session id to this but when I arrive at the page the link looks like this:
/updatemembers.php?sessionid=486er5f8456er8e5f8ef etc
So by saying $PHP_SELF it uses this link then adds the additional string values to the end so I am adding another session id to the end surely?
Not sure what to do from here...
