473,324 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

How do I see which button I clicked using PHP?

how can i get which button i have click in php
Sep 7 '07 #1
3 1487
gregerly
192 Expert 100+
how can i get which button i have click in php
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.

Greg
Sep 7 '07 #2
Atli
5,058 Expert 4TB
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.
Sep 7 '07 #3
Atli
5,058 Expert 4TB
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!

Moderator
Sep 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jim Mitchell | last post by:
I am using the following code to trap the onclick event for the Toolbar Webcontrol. The problem is that I have no way to tell which button on the toolbar was clicked. Any ideas? Thanks in...
5
by: Quinn | last post by:
When users clicked a unkown mime type link such as Zip on my website, a "Save/Open/Cancel" dialog box pops up. Is there a way to detect which button users clicked by using ASP? actually I only what...
3
by: Dave | last post by:
If you have multiple buttons on a web form, how can you detect which control was clicked in the Page_Load event Thanks, Dave
7
by: Amadelle | last post by:
Hi all and thanks in advance, I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if...
4
by: Shawn | last post by:
Hi. I have a ToolBar with a couple of ToolBarButtons. On postback after clicking on of the buttons Page_Load is called first then the ToolBarButton's click event is called. Is there anyway for...
0
by: paulsanna | last post by:
Hi there, I have 2 buttons on the source page that would submit the form to the target. The target page page would do something different with the results based on which button was clicked. I am...
3
by: AlecL | last post by:
Hi All, I am trying to capture the value of a textbox as a result of a button click event in a repeater, but it can't find the textbox. Here is what I am trying to do in the code for the click...
7
by: jambyl | last post by:
I have two JSP pages PageOne.jsp and PageTwo.jsp. On the PageOne.jsp I have TextBoxOne and TextBoxTwo. Next to each of these textboxes there is a "Wizard1" button and "Wizard2" button. When the...
1
by: tiijnar | last post by:
Hi, I am using a JSP in my application. In JSP page I created tables and buttons inside a loop. <% i=0; while(i<4) { %> <table align="left" width="100%"> <tr>
23
by: shashi shekhar singh | last post by:
Dear sir, I have a word document file contains text and images, now i have saved it as a web page and wants to display it on browser , using , string str=directory.getfiles("");...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.