Jump to content

Option Value


gple

Recommended Posts

@steve - that may be rather too cryptic for gple.

 

<form action="nextpage.php" method="post">
<select name="something">
<option value="banana">banana</option>
<option value="lemon">lemon</option>
</select>
<input type="submit" value="pick a fruit"/>
</form>

 

<?php
// nextpage.php
$fruit = $_POST['something']; // retrieve POSTed value from form
.. establish database connection
.. select database
$query = "INSERT into table_name .... "; // create your query string
$result = mysql_query($query); // execute query
?>

Link to comment
https://forums.phpfreaks.com/topic/44183-option-value/#findComment-214728
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.