I found this code that does exactly what i need
When i copy the code into a new dreamweaver php file, it states that there is a syntax error in this part:
<?php
$result = mysql_query("SELECT * FROM news")or die(mysql_error());
while($row = mysql_fetch_object($result))
{
echo "<ul>n";
echo "<li>$row->newsTitle <a href="javascript:delnews('$row->newsID','$row->newsTitle')">Delete</a></li>n";
echo "</ul>n";
}
?>
more specifically in the echo <li>$row line.
if I try to upload it anyways it says:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/asbj1076/public_html/testdel/admin.php on line 39
i can save it as a html5 file without that syntax error, but the code still aint working properly.
Any suggestions?
I know there has been a lot of similar questions already, sorry for that. I'm just a noob who's in over my head, so i need really specific help.
Thanks. Asbjørn
"in middle of the second echo using\"instead.echo "<li>$row->newsTitle <a href=\"javascript:delnews('$row->newsID','$row->newsTitle')\">Delete</a></li>n";