$con = mysql_connect("localhost","root","");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("vinzq", $con);
session_start();
$confirmation = $_SESSION['confirm'];
$result = mysql_query("SELECT * FROM reservation WHERE confirmation = '$confirmation'");
while ($row = mysql_fetch_array($result)) {
$arrival = $row['arrival'];
$departure = $row['departure'];
$adults = $row['adults'];
$child = $row['child'];
$nroom = $row['no_room'];
$result = $row['result'];
$name = $row['firstname'];
$last = $row['lastname'];
$city = $row['city'];
$zip = $row['zip'];
$country = $row['country'];
$password = $row['password'];
$email = $row['email'];
$cnumber = $row['contact'];
$stat= 'Active';
}
I have my codes here written in php. At the bottom after this code snippet, I have used html to display out the different variables. The values of the variables are correct, however the error that
mysql_fetch_array() expects parameter 1 to be resource, string given,
still pops up even tho it's functional. The error seems to belong to the while statement line.