Forum Moderators: coopster

Message Too Old, No Replies

hidden button processing

hidden php processing

         

NeilsPHP

2:57 am on Aug 29, 2008 (gmt 0)

10+ Year Member



i m trying to transfer some values hidden to next page in php.but for some reason,simple code won't work.

filename:success.php

<?php

if(!isset($_POST(['submit'])))
{
<form action="success.php" method="post">
<input type="hidden" name="fan" value="college">

<input type="image" src="/images/someimage.jpg" name="submit" >
</form>

}
else
{
$x= $_POST(['fan']);
echo"$x";
}
?>

this will only show someimage.jpg and even though i m clicking on it (submitting the form and hidden values) its not recognizing it..
any help appreciated.
thanks

NeilsPHP

3:31 am on Aug 29, 2008 (gmt 0)

10+ Year Member



FYI

I tried to replace input type image to simple input type submit,and it works fine..what is the correct syntax for image button ?

dreamcatcher

9:01 am on Aug 29, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Its as you have it. You access it via its name. IE will probably also require you to use the co-ordinate check too:

if (!isset($_POST['submit']) && !isset($_POST['submit_x'])) {
}

dc