Hi all,
I really do avoid posting questions and I also search before hand, but this has got me stumped 🙁
The following script originated from a form page I created which had simple text fields that would be submitted to a db. I have tried to create a pulldown using the same principles and it's not working, anyone got a idea why?
<form action="submitted-form.php" method="POST">
<select name="names">
<option value="2">Roger</option>
<option value="3">Paul</option>
</select>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
POSTS TO:
$sql = "INSERT INTO table (names-column) VALUES ('".$_POST["names"]."')";
$res = mysqli_query($mysqli, $sql);
That's it in principle, pages point to the correct file, a mysql connection is successful and ultimately this work when I had an HTML text field based page.
Many thanks,
Chris