Running a local database using apache server for PHP and I can’t get this to work, once the script hits any mySQL code it just stops. phpinfo() works.
<?php
echo "SAY"; //this works
mysql_connect("localhost", "root", "somepass") or die(mysql_error());
mysql_select_db("responses") or die(mysql_error());
$query = "SELECT * FROM survey";
$result = mysql_query($query);
$rows = mysql_num_rows($result);
echo "There are ".$rows." rows"; //this won't
?>
Am I missing something?
I’m sure the info for the connect is right because I’m able to use them to connect to my database for a editting tool. :shifty: