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?

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.