Hi All
I am trying to get my forms to which are only accessible to logged user to auto fill their name and emails I tried this bit I found on the forums but it seems to break my form and only display a blank page any help would be greatly appreciated.
I am trying to get my forms to which are only accessible to logged user to auto fill their name and emails I tried this bit I found on the forums but it seems to break my form and only display a blank page any help would be greatly appreciated.
<?php
global $my, $database;
$query = "SELECT *"
. "\n FROM #jos_contact_details"
. "\n WHERE user_id = '$my->id'";
$database->setQuery( $query );
$contact = $database->loadObjectList();
$contact = $contact[0];
?>
Name: <?php echo $contact->name; ?><br />
Email: <?php echo $contact->email_to; ?>