Ok,
I posted earlier about this, a blank php page. I've enabled logging
ALL in the php.ini, but nothing. If I change the name of the db in
the include file, I get an error message, so I guess this means it's
connecting to the mysql db. I've included the first couple lines of
code for this page:
index.php
<?php
session_start() ;
require_once('i nc/db_config.inc.p hp');
$conn = db_connect();
$sqlsu = "SELECT * FROM subjects ORDER BY ID";
$ressu = mysql_query($sq lsu, $conn);
if (mysql_num_rows ($ressu)) {
while ($qry = mysql_fetch_arr ay($ressu)) {
$cat = stripSlashes($q ry['cat']);
$resns = mysql_query("SE LECT * FROM questions WHERE test LIKE '$cat'",
$conn);
$numcat = mysql_num_rows( $resns);
inc/db_config.inc.p hp
function db_connect()
{
$result = @mysql_pconnect ('localhost', 'root', 'password);
if (!$result)
return false;
if (!@mysql_select _db('quiz'))
return false;
return $result;
}
?>
I posted earlier about this, a blank php page. I've enabled logging
ALL in the php.ini, but nothing. If I change the name of the db in
the include file, I get an error message, so I guess this means it's
connecting to the mysql db. I've included the first couple lines of
code for this page:
index.php
<?php
session_start() ;
require_once('i nc/db_config.inc.p hp');
$conn = db_connect();
$sqlsu = "SELECT * FROM subjects ORDER BY ID";
$ressu = mysql_query($sq lsu, $conn);
if (mysql_num_rows ($ressu)) {
while ($qry = mysql_fetch_arr ay($ressu)) {
$cat = stripSlashes($q ry['cat']);
$resns = mysql_query("SE LECT * FROM questions WHERE test LIKE '$cat'",
$conn);
$numcat = mysql_num_rows( $resns);
inc/db_config.inc.p hp
function db_connect()
{
$result = @mysql_pconnect ('localhost', 'root', 'password);
if (!$result)
return false;
if (!@mysql_select _db('quiz'))
return false;
return $result;
}
?>
Comment