I’m not sure if this is the correct section of the forums to ask this…
Anyways. Is there a problem with embedding Drop-down Select Boxes within php? I am making an update script for a particular sql table. ?
Below is a section of the update script/page i would prefer to have…
[code=php]Echo”<form action=’update2.php’ method=’post’ >
<input type=’hidden’ name=’id’ value=’$id’>
KoC Name: <input type=’text’ name=’koc_name’ value=’$koc_name’><br>
Rank: <select name=”dm_rank” size=”1″ value=”Demented”> // line 30
<option value=”Deranged”>Deranged</option>
<option value=”Deviant”>Deviant</option>
<option value=”Derilious”>Derilious</option>
<option value=”Demented”>Demented</option>
<option value=”Maniacal”>Maniacal</option>
</select><br>
Stats Link: <input type=’text’ name=’stats’ value=’$stats’><br>
<input type=’Submit’ value=’Update’>
</form>
</p>”;
However, it gives the following error…(i have indicated line 30 in the above.)
[QUOTE]
Parse error: parse error, expecting `‘,” or
The script only works if i breakout of parsing of the php around the Drop-down Select Box.
[code=php]Echo”<form action=’update2.php’ method=’post’ >
<input type=’hidden’ name=’id’ value=’$id’>
KoC Name: <input type=’text’ name=’koc_name’ value=’$koc_name’><br>
“;
?>
Rank: <select name=”dm_rank” size=”1″>
<option value=”Deranged”>Deranged</option>
<option value=”Deviant”>Deviant</option>
<option value=”Derilious”>Derilious</option>
<option value=”Demented”>Demented</option>
<option value=”Maniacal”>Maniacal</option>
</select><br>
<?
Echo”Stats Link: <input type=’text’ name=’stats’ value=’$stats’><br>
<input type=’Submit’ value=’Update’>
</form>
</p>”;
I dont beleive there is an error anywhere else on the page – as, if i remove the Drop-down Select Box, the form can then be parsed straight through without an error.
Does anyone know what the problem is here? ?
Thank you
Shears ?