<?php
include("Connection.php");
// Write out our query.
$query = "SELECT Show_Title FROM tblShows";
// Execute it, or return the error message if there's a problem.
$result = mysql_query($query) or die(mysql_error());
$dropdown = "<select name='Show_Title'>";
while($row = mysql_fetch_assoc($result)) {
$dropdown .= "\r\n<option value='{$row['Show_Title']}'>{$row['Show_Title']}</option>";
}
$dropdown .= "\r\n</select>";
echo $dropdown;
?>
I've tried using a submit button on a form to then insert it in to a table but it just isn't working. I am fairly new to PHP and it has been racking my brains.
So far the combo box will show with the data that is required but nothing else will happen.
I am guessing I will then need an INSERT query and a submit button to run it. Just have no idea where to enter this information as I've tried but the page just refreshes and no data is submitted.

New Topic/Question
Reply



MultiQuote




|