Jump to content

<input type ="image" name="submit" ????


critical-state

Recommended Posts

Can anyone shed some light why I am unable to get this to work?

This is a test of a script that I am working on. I want to test and use the condition "if(isset($_POST['submit']" so that I am able to exit(); the page and call up a new one after my form has been submitted. It works fine is I use a submit button. But I want to use an image button. Can any one help?? Hope you can understand what I am on about ;D

 

 

<form method="post" action="" name="test">

<input type ="text" name="test" maxlength="20" value="Enter data Here">

<input type="image" name="submit" src="/images/profilebutton.png" value ="Update Profile">

</form>

<?php

if(isset($_POST["submit"])){

echo "Submit has been pressed";//can't get this to work when input type is an image???

}else{

echo" waiting for responce";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/123125--/
Share on other sites

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.