First, the below code gives me an error where the mysql_num_rows(); function is called.
$dbConnection = mysql_connect($dbHost, $dbUser, $dbPass);
// Check Database to See If Date Already Exists
$dateQuery = "SELECT date FROM $tableCountDay WHERE date='$numDate'";
$dateExe = mysql_query($dateQuery);
$numberRows = mysql_num_rows($dateExe);
Secondly, Is there a way to keep session data even after the browser is closed? Or will have to use a cookie?
1. what error message did you get
2. only within the specific period before it times out. Use cookie, you could set longer period.
It told me that mysql_num_rows(); was not a valid resource.....
Make sure that you successfully connected to mySQL before do the query. That's normally the case when I get that error
Try pasting the exact query you're trying to make to mysql through telnet/ssh, if it gives back an error then fixing the query should make mysql_num_rows work.
If you're getting the "not a valid resource" message, your query has a problem. Either your connection has failed, or perhaps you've used an invaild fieldname in your query...for example, using this query...
SELECT subject FROM articles WHERE aid='$id'
...when the field is called "title" instead of subject, or where there is an "articleid" field, as opposed to an "aid" field.