Jump to content

php script is coming out differently


devang23

Recommended Posts

i have this script and everytime i load it to see the information that was entered into the first name part doesnt show up, and it says )able at the top.

 

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

$conn=mysql_connect("mysql4.000webhost.com","a3213677_dolphin","hello23") or die(mysql_error());
$rs = mysql_select_db("a3213677_snorre", $conn) or die("NOOOPE");
$sql="select * from `User Table` Where 1";
$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/184480-php-script-is-coming-out-differently/
Share on other sites

move username and password from your post

 

try

<?php

$conn=mysql_connect("********","*******","*******") or die(mysql_error());
$rs = mysql_select_db("*******", $conn) or die("NOOOPE");
$sql="select * from `User Table` Where 1";
$rs=mysql_query($sql,$conn) or die(mysql_error());;
$row= mysql_fetch_array($rs) )
print_r($row);
?>

and post output

Archived

This topic is now archived and is 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.