Current location: Hot Scripts Forums » Programming Languages » PHP » Input type values


Input type values

Reply
  #1 (permalink)  
Old 12-02-08, 12:44 PM
DJH DJH is offline
Newbie Coder
 
Join Date: Oct 2008
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Input type values

Hi

I have a form which allows users to input an image and some data. I want to allow them to verify the info, and give them a chance to alter image \ info before validating and storing the image date on the server.

in the form I have two input boxes

<input type="submit" name = "reset" value="Reset" /></tr>

<input type="submit" name = "store" value="Store" /></tr>

Both input boxes work, but how can i find which of the input boxes has been used.

I have tried to find it using
$value = $_POST['name'];

but this does not seem to work. Can anybody out there point me in the right direction please?

Cheers
Reply With Quote
  #2 (permalink)  
Old 12-02-08, 02:56 PM
landing's Avatar
landing landing is offline
Coding Addict
 
Join Date: Jul 2006
Location: Scotland
Posts: 302
Thanks: 0
Thanked 0 Times in 0 Posts
Try this

PHP Code:

if (isset($_POST['reset'])) {

     
// Reset button pressed

} elseif (isset($_POST['store'])) {
     
// Store button pressed

__________________
Always sanitise your data


Best regards
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Dealer Script nuzzle PHP 17 04-14-10 08:34 PM
[SOLVED] Friend to Friend Shortest Path sandeep.kumar Database 51 01-15-09 03:12 AM
[SOLVED] Is there an INPUT TYPE = CREATE FILE? jej1216 PHP 4 09-08-08 04:37 PM
How come Account_Type and Organization cannot accept user input? toezaurus81 C/C++ 1 07-30-04 01:59 PM


All times are GMT -5. The time now is 08:25 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.