Hi,
keep getting the following error when loading the code below: Warning: mysql_result(): supplied argument is not a valid MySQL result resource in ... [the lines where i am outputting hte data]
Everything seems to be all right, though. Any help would be appreciatedm regards,
tim
<?php $link = mysql_connect("localhost", "user", "pass");
mysql_select_db("data");
$result = ("SELECT * FROM cp WHERE cp_id='$cpid'") or die (mysql_errno(). ": " . mysql_error());
?>
<table>
<tr>
<td><?php printf("%s \n", mysql_result($result,0,"cp_name")); ?></td>
</tr>
<tr>
<td><?php printf("%s \n", mysql_result($result,0,"cp_type")); ?></td>
</tr>
<tr>
<td><?php printf("%s \n", mysql_result($result,0,"cp_ind_type")); ?></td>
</tr>
<tr>
<td><?php printf("%s \n", mysql_result($result,0,"cp_employees")); ?></td>
</tr>
</table>