<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dear all,
>
> Can you please help me with the following?
>
> I have written the following script: If i have a input type image; the
script doesn't go to the prospect2.php. If i have a input type=submit
everything works super! Can someone help me?
>
> Frank
>
____________________________________________________________________________
_________
> <?
> $_POST["submit"]=isset($_POST["submit"])?$_POST["submit"]:"";
> if($_POST['submit']!="")
> {
> file://$printresse=$_POST['printresse'];
> session_start();
> $_SESSION["printresse"] = $_POST['printresse'];
> header("Location: prospect2.php");
> exit;
> }
> ?>
> <html>
> <body>
> <form name="form1" method=post id=form1 enctype=multipart/form-data
action=<?=$_SERVER['PHP_SELF']?>>
> <select name="printresse">
> <OPTION>Value1</OPTION>
> <OPTION>Value2</OPTION>
> </SELECT>
> ?>
> echo"<td align=\"right\"><input type=\"image\"
src=\"images/next_button.jpg\" name=\"submit\" value=\"submit\"></td></tr>";
> ?>
> </form>

Hi,

if you use the input type 'image' you have to check for name_x or name_y, so
in your case:
$_POST['submit'] = isset($_POST['submit']) ? $_POST['submit_x'] : '';

Whenever you have problems like this do a print_r($_POST) at the top of the
second page. This will show you all submitted values.

Regards, Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to