Query Error: Newbie Help
Posted: Sun Feb 15, 2009 1:41 pm
Hello,
I'm new to PHP and I can't figure this error out for the life of me.
[15-Feb-2009 11:35:37] PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource on line 8.
##################################################
Any help would be appreciated!
<?php
$dbc = mysql_connect('localhost','username','password');
$query = 'SELECT * FROM Users';
$result = mysql_query($dbc,$query) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
$checkEmail = $row['email'];
echo $checkEmail;
}
mysql_close($dbc);
?>
I'm new to PHP and I can't figure this error out for the life of me.
[15-Feb-2009 11:35:37] PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource on line 8.
##################################################
Any help would be appreciated!
<?php
$dbc = mysql_connect('localhost','username','password');
$query = 'SELECT * FROM Users';
$result = mysql_query($dbc,$query) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
$checkEmail = $row['email'];
echo $checkEmail;
}
mysql_close($dbc);
?>