how can i get which button i have click in php
How do I see which button I clicked using PHP?
Collapse
X
-
Tags: None
-
Are you reffering to an html <button> or <input type='submit'>? If so, the button name is available in the post or get array (depending on how your submitting the form). Maybe you can elaborate on the problem your having. Post some code of the problem your actually having and we might be able to help more.Originally posted by sandipnawalehow can i get which button i have click in php
Greg -
Hi.
PHP does not have events like you see in other languages, like .Net.
PHP is executed server-side, so nothing that happens in your browser can trigger any PHP code. That is of course unless it uses Ajax or causes the page to reload.
All buttons and such things belong to client-side scripts, like JavaScript.
But as Greg says, data sent through HTML forms can be read by PHP as they are received by the server.Comment
-
I've changed the title of this thread to better describe it's topic.
Using good, descriptive titles that follow the Posting Guidelines will increase your chances of getting you questions answered!
ModeratorComment
Comment