When I run this code, nothing shows up.
<?php
$host="***********"; // Host name
$username="**********"; // Mysql username
$password="***********"; // Mysql password
$db_name="**********"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$query="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
echo "ID Number: ". $row['id']. "<br />Name: ". $row["name"]. "<br />Project Status: ". $row["status"]. "<br />Day Started: ". $row["start"]. "<br />Estimated Finish Date: ". $row["finish"]. "<br />Main Phone Number: <a href='tel:". $row["mainphone"]. "'>". $row["mainphone"]. "</a>". "<br />Business Phone Number: <a href='tel:". $row["businessphone"]. "'>". $row["businessphone"]. "</a>". "<br />Home Phone Number: <a href='tel:". $row["homephone"]. "'>". $row["homephone"]. "</a>". "<br />Fax: ". $row["fax"]. "<br />Email Address: ". $row["email"]. "<br />Job Estimate: $". $row["estimate"]. "<br />Job Address: ". $row["address"] ;
}
mysql_close();
?>
It comes up a plain white screen. Before I added while
Everything showed up correctly except for the data it was supposed to pull from SQL. If you could point out any flaws or reasons why it wouldn't be working, I would greatly appreciate it.