I am populating a Select box with values from a database. I want to pass the value the user chooses to another form. When I retrieve the variable, it is truncated. Example..."Hello Dolly" becomes "Hello" anyone know how to get the whole word variable through? Below is my code....and please excuse the mess.
<form method="post" name="displayReviews" action="movies.php"><br>
Name:
<Select Name="movie_names">
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("chicago",$db);
$result = mysql_query("Select name From movies", $db);
mysql_close($db);
while($row = mysql_fetch_row($result))
{
foreach ($row as $name)
{
print "<option value=$name>$name";
}
}
?>
</select>
<input type="Hidden" name="hmovieName" value='<?php echo $movie_names;?>'>
<input type="Submit" value="See Reviews">
</form>
</td>
</tr>
<tr>
<td colspan="2">
Review:
<?php
$movieNames = $_POST["movie_names"];
print $movieNames;
?>