Old 03-06-2007, 16:29   #1 (permalink)
Dirti
Professional Idiot
 
Dirti's Avatar
 
Join Date: Aug 2006
Location: Uk
Posts: 59
php/MySQL form problem

Right so I have this form with a drop down like:

<select name="drop_down_name">
<option id="Submit this">A Value</option>
</select>

And I'm sending this to my handler file like:

$Submit this= $_POST['Submit this'];

echo $Submit this;

And this echos "A Value"

But what I want it to do is take the option id "Submit this" and echo the actual id "Submit this" instead of the text inside the option. How can I do this?

Appreciate any help
  Reply With Quote
Old 03-06-2007, 16:30   #2 (permalink)
austers
Registered User
 
Join Date: Jun 2007
Posts: 30
Instead of
Code:
Id="Submit this"

use
Code:
value="Submit this"
  Reply With Quote
Old 03-06-2007, 16:56   #3 (permalink)
Dirti
Professional Idiot
 
Dirti's Avatar
 
Join Date: Aug 2006
Location: Uk
Posts: 59
Thanks a lot
  Reply With Quote
Old 03-06-2007, 17:06   #4 (permalink)
austers
Registered User
 
Join Date: Jun 2007
Posts: 30
No problem
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8