Solved

Retrieve submited value of the submit botton.

Posted on 2006-07-13
2
219 Views
Last Modified: 2013-12-13
Retrieve submited value of the submit botton.
Please don't user javascript

1st form

Form1.php

<form method="POST" action="didclick.php">
<input type="submit" value="ClickA" name="ClickA" >
<br>
<input type="submit" value="ClickB" name="ClickB" >
</form>


2nd form
didclick.php
<?php
Echo "Did click";
///something here
?>

Thanks
0
Comment
Question by:jetleestye
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17103279

<form method="POST" action="didclick.php">
<input type="submit" value="ClickA" name="ClickA" >
<br>
<input type="submit" value="ClickB" name="ClickB" >
</form>


2nd form
didclick.php
<?php
$click = "N/A";
if (isset($_POST['ClickA']))  $click = "ClickA";
if (isset($_POST['ClickB']))  $click = "ClickB";
 
Echo "Did click: $click";
///something here
?>
0
 

Author Comment

by:jetleestye
ID: 17104094
thank you
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now