Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hostname="localhost";
- $username="***";
- $password="***";
- $dbname="***";
- mysql_connect($hostname,$username, $password) or die ("<html><script language='JavaScript'>alert('Unable to connect to database! Please try again later.'),history.go(-1)</script></html>");
- mysql_select_db($dbname);
- # Check If Record Exists
- $query = "SELECT * from schools where schools_state=WA ";
- $result = mysql_query($query);
- if($result){
- while($row = mysql_fetch_array($result)){
- $name = $row["$school_name"];
- echo "School: ".$school_name."<br/>";
- }
- }
Add Comment
Please, Sign In to add comment