1 Replies - 1070 Views - Last Post: 20 January 2013 - 07:50 AM Rate Topic: -----

#1 hwoarang69  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 171
  • Joined: 23-October 12

how to save value from drop menu by using php.

Posted 20 January 2013 - 02:34 AM

how to save value from drop menu by using php.



    <select name = 'color'>
    	<option value='black'>Black</option>
    	<option value='gray'>Gray</option>
    	<option value='white'>White</option>
    </select>




i am saving the value from text field by doing this. i am thinking if i can do some thing like this in drop down menu.


 <input type="text" name="username"  
       value="<?php if(isset($_POST['username'])){echo htmlentities($_POST['username']);}?>" />



Is This A Good Question/Topic? 0
  • +

Replies To: how to save value from drop menu by using php.

#2 Coding123  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 19
  • Joined: 26-November 12

Re: how to save value from drop menu by using php.

Posted 20 January 2013 - 07:50 AM

You can check it here: link

Just use $_POST['color'] in your case.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1