Warning: oci_fetch_array() expects parameter 1 to be resource, string given
Please help me to solve this problem. I couldn't understand the error. I read related article, but they show about boolean error, mine is string. Why is that happen? Pleaseee help me..
if(isset($_COOKIE['ID_site']) && isset($_COOKIE['Pass_site']))
$_SESSION['id'] = $_COOKIE['ID_site'];
$_SESSION['password'] = $_COOKIE['Pass_site'];
$id = $_SESSION['id'];
$pass = $_SESSION['password'];
$query2 = oci_parse($conn,"SELECT * FROM user1 WHERE id ='".$id."'")or die(oci_error());
$check2 = oci_execute($query2);
while($info2=oci_fetch_array(query2,OCI_ASSOC+OCI_RETURN_NULLS)) //the error is from this line
//if the cookie has the wrong password, they are taken to the login page
if (($pass != $info2['PASSWORD']) || ($info2['ROLE'] != 'admin') )
//otherwise they are show the admin home
OMG, I made a huge mistake. How can I not notice that I just missing the $ sign all this while?
admin pls remove this post. I'm too ashamed.
We all tend to look for complicated reasons instead of the simple reasons when we get an error. It won't be the last time it happens to you.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread