Jump to content

[SOLVED] Notice: Trying to get property of non-object help :(


jamesxg1

Recommended Posts

<?php session_start();

ini_set('display_errors', 1);
error_reporting(E_ALL);

include 'Database/Connection.php';
include 'Database/Utility.php';

isloggedin();
accessneeded("C");

$userid = $_SESSION['userid'];

$count = 0;
$query = mysql_query(sprintf("SELECT * FROM contacts WHERE holder = '$userid'")) or die(mysql_error()); 
while ($row = mysql_fetch_assoc($query)) { 
if ($count!=0){echo "<hr>";}

print "First Name: <font color='red'>$row->firstname<br></font>Last Name: <font color='red'>$row->lastname<br></font>Address: <font color='red'>$row->address<br></font>Postcode: <font color='red'>$row->postcode<br></font>Email: <font color='red'>$row->email<br></font>Phone Number: <font color=red>$row->pnumber<br></font>";

$count++;
}

?>

 

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

 

Notice: Trying to get property of non-object in C:\xampp\htdocs\family\ContactsView.php on line 19

First Name:

Last Name:

Address:

Postcode:

Email:

Phone Number:

 

 

Many thanks

 

James.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.