Jump to content

Recommended Posts

for some reason this script continues to give me a mysql syntax

PHP Error Message

 

Parse error: syntax error, unexpected T_STRING in /home/a3213677/public_html/workpart2.php on line 10

 

<html><head><title>I'm a GENUIS</title></head>
<body>
<?php

$conn=mysql_connect("mysql4.000webhost.com","a3213677_dolphin","******") or die(mysql_error());
$rs = mysql_select_db("a3213677_snorre", $conn) or die("NOOOPE");
$sql="SELECT * FROM `User Table`;
$rs=mysql_query($sql,$conn) or die(mysql_error());;

$list = "<table border=\"1\" cellpadding=\"2\">";
$list.="<tr><th><First Name</th>";
$list.="<th>Last Name</th>";
$list.="<th>UserName</th>";
$list.="<th>PassWord</th></tr>";

while($row= mysql_fetch_array($rs) )
{
$list .= "<tr>";
$list .= "<td>".$row["first_name"]."</td>";
$list .= "<td>".$row["last_name"]."</td>";
$list .= "<td>".$row["username"]."</td>";
$list .= "<td>".$row["password"]."</td>";
$list .= "</tr>";
}
$list .= "<\table";

echo($list);

?>
</body><html>

Link to comment
https://forums.phpfreaks.com/topic/184301-mysql-not-working/
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.