themitch2004
asked on
Submt variable not set in IE
I have a form which seems to work fine in Firefox but not so fine in IE6/7.
The form submits, via the POST method to itself. When I reload the page I check to see using the following code:
if ( $_POST['Submit'] == 'submit' ) {
Lower down the page I have the submit button defined as follows:
<input name="Submit" type="submit" src="images/savebtn.jpg" value="submit">
Originally I had the type set to image (hence the src attribute) but have just changed it to a submit type to see if it works better - as i say, it doesn't,
Before the button I have the form defined as ...
<form name="budget" method="post" action="mybudget.php">
I am using PHPED to write this code and when I run it with the debugger and look at the variables, the $_POST['Submit'] variable isn't there. There is, however, a $_POST['Submit.x'] and $_POST['Submit.y'] variable.
Any idea why this isn't working.
Website is at www.jwedding.co.uk
Thanks
M
The form submits, via the POST method to itself. When I reload the page I check to see using the following code:
if ( $_POST['Submit'] == 'submit' ) {
Lower down the page I have the submit button defined as follows:
<input name="Submit" type="submit" src="images/savebtn.jpg" value="submit">
Originally I had the type set to image (hence the src attribute) but have just changed it to a submit type to see if it works better - as i say, it doesn't,
Before the button I have the form defined as ...
<form name="budget" method="post" action="mybudget.php">
I am using PHPED to write this code and when I run it with the debugger and look at the variables, the $_POST['Submit'] variable isn't there. There is, however, a $_POST['Submit.x'] and $_POST['Submit.y'] variable.
Any idea why this isn't working.
Website is at www.jwedding.co.uk
Thanks
M
$_POST['Submit.x'] and $_POST['Submit.y'] are the coordinate of the image in the src attribut
ASKER
Thanks. But what has happened to $_POST['Submit']?
try $_POST['submit'] using the value instead of the name.
ASKER
Thanks, but doesn't make a difference.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just try this
if($_POST[])
{
}
or
if($_POST)
{
}
one of these should work fine, i dont remember which one.
kiranvj
if($_POST[])
{
}
or
if($_POST)
{
}
one of these should work fine, i dont remember which one.
kiranvj
try this
echo($_POST['Submit'])
what is it echoing
kiranvj
echo($_POST['Submit'])
what is it echoing
kiranvj
Forced accept.
Computer101
EE Admin
Computer101
EE Admin