Jump to content

Mysql_Fetch_Array() Expects Parameter 1 To Be Resource


orige

Recommended Posts

I got that error ... from this coding ...

 

 

<?php

 

$rnum = $_REQUEST["txtrn"];

 

$con = mysql_connect('localhost','root','');

mysql_select_db ('q4',$con);

if (!$con)

{echo 'connection error!';}

else

{$result = mysql_query("Select * from student where rollno = '$rnum'");

$row = mysql_fetch_array ($result);

if ($row)

{echo "rollno : ".$row[0];

echo "Name : ".$row[1];}

else

{echo "rollno doesnt exist!";}

}

?>

 

 

can u find where the error is ?? and fix it plz ??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.