This is my code:
addgame.php
<?
include("config.php");
$result = mysql_query("SELECT * FROM platform");
while ($row = mysql_fetch_assoc($result)) {
$platform = '<option value="' . $row['platname']. '">';
}
?>
<html>
<form method="post" action="cp_admin/submitgame.php">
<h3>Title:</h3>
<input type="text" NAME="title">
<h3>Description:</h3>
<textarea name="description" rows="10" cols="48"></textarea>
<h3>Platform:</h3>
<select name="platform">
<?php echo $platform; ?>
</select>
<br>
<br>
<INPUT TYPE="submit" name="submit" value="submit">
</form>
</html>
I have a table in my database named "platform"
the row in the table is "platname"
I want to display the platform names in a drop down box and have it display where it says "<? php echo $platform; ?>
Can anyone tell me what I have done wrong? If you need more info let me know.