PHP and Select box, where am i going wrong?

tim

New member
Hi there,
I have a select box that connect to a database and shows a list of the items. I want to use $_post to get the option the user selects and then display this, however when I try display this its ALWAYS blank, it's annoying me, im about to hadouken my Mac out the window, can anyone help? here's my code.....

---delete.php----
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("stock", $con);

$query = mysql_query("SELECT brand FROM phonestock");
?>
<form action="new.php" method="post">
<select name="tink">
<option> test </option>
<?php

//for each row we get from mysql, echo a form input
while ($row = mysql_fetch_array($query)) {
echo "<option value=\"$row[model]\">$row[brand]</option>\n";
}
?>
</select>
<input type="submit"name="Submit" value="Submit">
</form>


---new.php----
<?php
echo $POST['tink'];
?>


NOTHING APPEARS, IF I TYPE SOMETHING ELSE THO THAN IT WILL APPEAR?? The <select> list show fine so im baffled
 
Back
Top