Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Retrieve submited value of the submit botton.

Posted on 2006-07-13
2
Medium Priority
?
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
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.
Suggested Courses

609 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