ack. my apologies, but i can't figure this out. i don't think i even care about this feature anymore, it's just annoying me so much that i have to finish it. i made the change you suggested and i don't get any error messages anymore. however, instead of displaying the contents of the message field on id (whatever), it just displays the word message.
here's the browse page:
<?
$username="name";
$password="pwd";
$database="db";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM contactus ORDER BY name ASC";
$result=mysql_query($query);
$num=mysql_num_rows($result);
mysql_close();
?>
// Table header row
<?
$i=0;
while ($i < $num) {
$id = mysql_result($result, $i, 'id');
$name=mysql_result($result,$i,"name");
$title=mysql_result($result,$i,"title");
$school=mysql_result($result,$i,"school");
$email=mysql_result($result,$i,"email");
$address=mysql_result($result,$i,"address");
$city=mysql_result($result,$i,"city");
$state=mysql_result($result,$i,"state");
$zip=mysql_result($result,$i,"zip");
$phone=mysql_result($result,$i,"phone");
$fax=mysql_result($result,$i,"fax");
$message=mysql_result($result,$i,"message");
?>
<tr>
<td><? echo $name; ?></td>
<td><? echo $title; ?></td>
<td><? echo $school; ?></td>
<td><? echo $email; ?></td>
<td><? echo $address; ?></td>
<td><? echo $city; ?></td>
<td><? echo $state; ?></td>
<td><? echo $zip; ?></td>
<td><? echo $phone; ?></td>
<td><? echo $fax; ?></td>
<td><a href="message.php?id=<? echo $id; ?>">Click to view</a></td>
</tr>
<?
$i++;
}
?>
this seems to be working ok as far as i can tell. the id in each link corresponds to the respective record. this is the results page (message.php):
<?php
$username="name";
$password="pwd";
$database="db";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$id = (int)$_GET['id'];
$query = "SELECT 'message' FROM `contactus` WHERE id='".mysql_real_escape_string($id)."' LIMIT 0,1";
$result = mysql_query($query);
$message = mysql_result($result, 0, 0);
echo $message;
mysql_close();
?>
when i click the click to view link the page it takes me to just displays the word message, regardless of which record i'm attempting to view. i'm sure it's something remarkably simple, but i can't see it. 🙁