Thanks, for the quick response, Halo. I love this forum.
This would actually go in results page
echo $row['user'].' You already filled this form on '. $row['date']. '<br />';
This will be the code:
<?php
include 'db.php';
mysql_select_db($dbname) or die(mysql_error());
$result = mysql_query("SELECT date, user FROM users");
//see if any row was found
if( mysql_num_rows($result) > 0 ) {
$allrows = array();// to put all result rows in
//$i=0; // no counter is really needed will work without
while (row = mysql_fetch_array( $result )){
$allrows[] = $row; //add this row into $allrows
if $pUser //received when user logs in =$row['user'] {
mysql_close($con);
include 'results.php';
}
else {
include 'Pollform.php';
mysql_close($con);
}
}