Don't know that this will work but it might help isolate the problem:
/* MySQL Connection Variables */
$host="localhost";
$user="arras_WebMaster";
$password="qwerty";
$dbase="arras_Members";
/* MySQL Connection String */
if(!$dbConnect = @mysql_connect ("$host", "$user", "$password"))
{
echo "Couldn't connect to the database server: ".mysql_error()."<br />";
}
if(!$dbSelect = @mysql_select_db ("$dbase"))
{
echo "Couldn't select the database: ".mysql_error()."<br />";
}
if(!$query = @mysql_query("SELECT * FROM RegisteredMembers"))
{
echo "Couldn't execute query: ".mysql_error()."<br />";
}
else
{
while($result = mysql_fetch_array($query))
{
echo $result['UserID'];
}
}
HTH,
Michael Egan
-----Original Message-----
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 09:34
To: [EMAIL PROTECTED]
Subject: [PHP] Re: MySQL QUERY Results Not Appearing[Scanned]
Craig. Thanks for the response and sorry I've been delayed in getting back
to you.
I put a new page together and dropped all the peripheral code and this is
what I ended up with:
<?php
/* MySQL Connection Variables */
$host="localhost";
$user="arras_WebMaster";
$password="qwerty";
$dbase="arras_Members";
/* MySQL Connection String */
$Connection=mysql_connect ("$host", "$user", "$password")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("$dbase");
/* Display Current Members */
echo "\n\n\n\n\n";
echo "<h3>active members should appear here</h3>";
$query = mysql_query("SELECT * FROM RegisteredMembers") or die("could not
execute query");
while($result = mysql_fetch_array($query)){
echo $result['UserID'];
}
?>
Still no joy though. Any ideas...?
--
-----------------------------
Michael Mason
Arras People
www.arraspeople.co.uk
-----------------------------
The information contained in this email (and in any attachments sent with it) is
confidential. It is intended for the addressee only. Access to this email by anyone
else is unintended and unauthorized.
If you are not the original addressee, 3tc asks you to please maintain
confidentiality. If you have received this email in error please notify 3tc
immediately by replying to it, then destroy any copies and delete it from your
computer system.
Any use, dissemination, forwarding, printing or copying of this email by anyone except
the addressee in the normal course of his/her business, is strictly prohibited. 3tc
owns the copyright in this email and any document created by us and assert the right
to be identified as the author of it. Copyright has not been transferred to the
addressee.
We protect our systems with Sophos Anti-virus -
www.sophos.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php