Hi PHP Developers..
I wanted to retrieve data from table called enquiry.
and in 1st page by name userform.php i have below code with $refno = ""; defined at the top of the page with in php tag:
<form name="form1" method="post" action="fetchdata.php">
<table width="auto" border="0" cellpadding="3" cellspacing="1" align="center" bgcolor="#FFFFFF">
<tr>
<td width="78">Ticket No.</td>
<td width="6">:</td>
<td width="78" class="float_left">
<input name="refno" type="text" value="<?php echo $refno; ?>"/></td>
</tr>
</table>
<input type='submit' value="Submit">
</form>
and i have fetchdata.php page where i wanted to retrieve data and display in a table format so i did code as below:
= "localhost"= "root"= ""= mysql_connect($dbhost,= ""= "select * from enquiry where refno='$refno'"= mysql_query($strquery);
<table>
<tr>
<th>Results for Refno entry</th>
</tr>
</table>
<table>
<tr>
<th>refno</th>
<th>date</th>
<th>agentname</th>
<th>zcno</th>
<th>callerid</th>
</tr>
= mysql_fetch_array($result))
= $data[= $data[= $data[= $data[= $data[
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<br /><br />");
and i am getting error as:
Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\xampp\htdocs\newcrm\fetchdata.php on line 99
refno date agentname zcno callerid
Please request you to help me getting code for retrieving data and it would be very helpful if i get code in simple form as i think i have did in very complex form.
Thanks in advance and happy to be a part of this forum as i get good help and also others questions help me grow from this forum.