0

I git this warning>>

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Program Files (x86)\EasyPHP 2.0b1\www\HotelCalifornia\sites\reserve_room.php on line 85
Unknown column '' in 'where clause

This is my code>>

<?php

$user=$_GET['username'];
$Custno=$_GET['Custno'];
$RoomNo=$_GET['RoomNo'];


$username="jasmine";
$password="price";

$db=mysql_connect("localhost" , $username, $password);
	
	mysql_select_db("hotel_cali", $db);

$sql="SELECT Email FROM customer WHERE username=\"$user\"";

$result=mysql_query($sql);

$myrow=mysql_fetch_array($result) or die(mysql_error());;

?>

How can i solve that?

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by bakir
0

the $result returneed from mysql is referein to an error or null niether that a result
set so the fetch function have invalid arguments and the solution is what Prof "pritaeas" is said as u have an error in ur mysql statement

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.