I have a script that I am trying run with PHP, that gets the contents of a database, and then arrange them in a pulldown menu. I then have that selected Name, for instance, and then I can choose between 2 Buttons. Edit and Delete.
Well.. Here is the code that I have so far:
<?php
include(connect.php);
$result = mysql_query('SELECT * FROM table');
echo "<h2>Current Database</h2>";
echo "<FORM ACTION=getlist.php TARGET="NEWWINDOW" METHOD=post>";
While ($row = mysql_fetch_array($result))
{
echo "<OPTION VALUE={$row['ID']}>{$row['FirstName']}{$row['LastName']}";
}
echo "</select>" .
"<INPUT TYPE=submit VALUE="Go!">" .
"</FORM>";
?>
When I take this and save it as getlist.php, it returns me with a :
Parse error: parse error, expecting ','' or';'' on line ... blah blah blah.
The line error is different no matter how I try and edit this, but it is geting stuck on echo "<FORM ACTION=getlist.php...", continually talking about the Parse Error (above).
I am trying to take this code (which works just fine for an html page) and make it work with my database information:
<FORM ACTION=getlist.php TARGET="NEWWINDOW" METHOD=post>
<SELECT NAME=location>
<OPTION VALUE="cactus">Cactus
<OPTION VALUE="iron">Iron
<OPTION VALUE="panther">Panther
<OPTION VALUE="sunrise">Sunrise
</SELECT>
<INPUT TYPE=submit VALUE="Go!">
</form>
I don't know what to do! Please help! Any, and ALL help will be much appriciated. Is this even possible? Help!!!
Thanks,
Danno~