ssssk2175
28.05.2004, 22:45
I am trying to hack the contact us component to automatically fill out some of the fields ( I have it linked only for registered users). I am using something like:
$database->setQuery( "SELECT * FROM #__users WHERE id = '$my->id'" );
and I 've done this same type of thing in custom modules and components before, but when I do it inside the contact.html.php or contact.php it seems as if $my->id isn't known. Does anyone know what is preventing me from doing this and how I might work around it? I am actually trying to make the contact form change dynamically according to who is accessing it and what type of contact they are trying to make. My assumption is that since the intention of the contact component would normally be for public accessibility, that there is some layer of insulation going on here, but I'm not sure what it is or how to work around it. Any help would be greatly appreciated.
$database->setQuery( "SELECT * FROM #__users WHERE id = '$my->id'" );
and I 've done this same type of thing in custom modules and components before, but when I do it inside the contact.html.php or contact.php it seems as if $my->id isn't known. Does anyone know what is preventing me from doing this and how I might work around it? I am actually trying to make the contact form change dynamically according to who is accessing it and what type of contact they are trying to make. My assumption is that since the intention of the contact component would normally be for public accessibility, that there is some layer of insulation going on here, but I'm not sure what it is or how to work around it. Any help would be greatly appreciated.