By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

problem with isset($_POST['submit'])

P: 92
I tried using the isset() function in the system that I am developing. But for some reason, it just doesn't work. I've checked my code over and over but it idn't seem to have any error.

i used something like this:
[PHP]
if(isset($_POST['submit']))
{
include("insert_form.php");
}
[/PHP]

please help. it's really urgent. thanks in advance.
Dec 29 '07 #1
Share this Question
Share on Google+
4 Replies


P: 14
I tried using the isset() function in the system that I am developing. But for some reason, it just doesn't work. I've checked my code over and over but it idn't seem to have any error.

i used something like this:
[PHP]
if(isset($_POST['submit']))
{
include("insert_form.php");
}
[/PHP]

please help. it's really urgent. thanks in advance.
Hi,

Have you checked the form from where your request is coming ..does it have action = "post" or is it "get"? Also check the name of the submit button.. is it exactly the same as what you have put in isset()? Have you said <input type = "submit" name = "submit"> ? Check these things once again.. Also, try putting an echo -statement in your if-condition... just to be sure whether the control is coming inside if or not..
Dec 29 '07 #2

P: 92
it uses action="post".

And the button connected to the script is an input type button with a validation script.
Dec 29 '07 #3

P: 14
it uses action="post".

And the button connected to the script is an input type button with a validation script.
Hi,

First of all, I have mistakenly written action = "post", its method = "post" ... sorry.. my bad!

Coming to what you are saying.. well... I am no expert, but normally if you have only one submit-button in your form then it's input type is generally given 'submit' ..atleast from what I have seen.. try making the input type as 'submit' and see.. and let us know if it works!
Dec 29 '07 #4

Markus
Expert 5K+
P: 6,050
Yeh, i had this problem. If it's just a 'button' with then uses a javascript .submit() it won't be recognised in the isset.

I'm not sure what the solution is either.
Dec 29 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.