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
https://forums.phpfreaks.com/topic/76569-solved-form-question-again/
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.