phpsharma,
If you don't want to use a submit button then you would use javascript or an alternate syntax for the input button. PHP wouldn't have anything to do with that side of it.
<input type='submit' value='Click Here' name='var' />
<input type='image' src='images/submit.jpg' value='Submit' alt='Submit' name='var' />
What you will get, because it's an image,
var.x = (x coordinates where user clicked)
var.y = (y coordinates where user clicked)
I did some testing on this and I can't seem to retrieve the values in PHP.
I used the following:
if (isset($_POST["var.x"])) echo $_POST["var.x"];
if (isset($_POST["var.y"])) echo $_POST["var.y"];
or even with the $_GET method if the form is set to submit via get, the query string shows up but I am not able to get the values to output from a script.
if (isset($_GET["var.x"])) echo $_GET["var.x"];
if (isset($_GET["var.y"])) echo $_GET["var.y"];
However despite this I was able to access other data set from other input elements. I'll have to do some researching on this to see how you access the data passed by the button itself.
??
If you don't want to use an image but want to use some other method, like fire form submission when a user selects something from a drop down list you would do that with JavaScript and would be a question better suited for that forum.
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::