Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ilguitto/domains/ilguitto.org/public_html/book/register.php on line 82
Could not insert to the register:
No database selected
ricevo questo errore alla riga in questione :
$num_rows = mysql_num_rows($select);
questo è il contesto:
//Check whether the student is already registered.
$select = mysql_query("select * from 'register' where userid = '" . $userid . "'", $connection);
//$query = mysql_real_escape_string($select);
$num_rows = mysql_num_rows($select);
if ( $num_rows )
$error = 'You are already registered.';
// check if an error was found - if there was, send the user back to the form
if (isset($error)) {
header('Location: book.php?e='.urlencode($error)); exit;
}
Qual'è il problema?
Mi serve un aiuto
grazie
Giuseppe
Could not insert to the register:
No database selected
ricevo questo errore alla riga in questione :
$num_rows = mysql_num_rows($select);
questo è il contesto:
//Check whether the student is already registered.
$select = mysql_query("select * from 'register' where userid = '" . $userid . "'", $connection);
//$query = mysql_real_escape_string($select);
$num_rows = mysql_num_rows($select);
if ( $num_rows )
$error = 'You are already registered.';
// check if an error was found - if there was, send the user back to the form
if (isset($error)) {
header('Location: book.php?e='.urlencode($error)); exit;
}
Qual'è il problema?
Mi serve un aiuto
grazie
Giuseppe