I have a table POST:
post_id int(5) not null auto_increment primary key,
name char(30) not null,
email char(30) not null
I have 2 scripts...index.php and view.php
<<<CODE of index.php>>>
<?
$dbconnect=mysql_connect("localhost, $user, pass");
$dbname=mysql_select_db("dbname", $dbconnect);
$query=("select * from TABLE_NAME");
$result=mysql_query($query);
$num_result=mysql_num_rows($result);
echo "Number of recods: <b>".$num_result."</b>";
echo "<br>";
for ($i=0; $i<$num_result; $i++)
{
$row=mysql_fetch_array($result);
$id=$row[post_id];
echo "<a href=view.php?post_id=$id>";
echo $row[name];
echo "</a>";
echo "<br>";
}
?>
<<<CODE of view.php>>>
<?
$dbconnect=mysql_connect("localhost, $user, pass");
$dbname=mysql_select_db("dbname", $dbconnect);
$query=("select * from TABLE_NAME WHERE post_id='$id'");
$result=mysql_query($query);
$row=mysql_fetch_array($result);
echo $row[email];
?>
When I click on the link(in index.php) it goes to view.php?id=NUMBER but
doesn't display email of that NUMBER (post_id)
Just a blank page.... nothing on it.
I Checked everything...... but didnt find any error..
Please help!!!!!!!!!!!!