Jump to content

[SOLVED] form question (again)


SirChick

Recommended Posts

If i use a if (isset ) on a submit button regarding a form on a process page... does that stop the users from going to the process page directly via the url and causing problems.. so like i can do

 

if (isset($_POST['submit']){

do process

}else{

header etc

}

 

would that stop the process being run if the user skipped the form or is it exploitable ?

Link to comment
Share on other sites

Yes. You can either use a header to force the user to another page or use

die("<a href='xxx.php'>click here to go to main page</a>");

to stop the script from running and give them a link. Remember a header will only work if it is the first thing outputted to the browser. so if you have your page title and nav bars coming up you may need to use the link.

 

Ray

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.