Posted on: 05/15/05 04:02pm
By: LostPuppy
So i have written a little script for my geeklog site and i have tested it on a regular php page and it works fine.
One of the feilds that needs to be filled out is 'name' , i would like to make that automatically be the loged in ID of the user, also if they are not loged in i don't want them to be able to see the submit button. How can I do this? and what kind of includes do i need to use (COM_HEADER or what not) and can i do it out side of my geeklog interface (example i want it to have a different look and feel then the rest of my site).
Thanks so much
Making it work with geeklog
Posted on: 05/15/05 04:05pm
By: Dirk
Include lib-common.php. You then have access to the global $_USER array. $_USER['username'] contains the current user's name and is empty for anonymous users.
bye, Dirk
Making it work with geeklog
Posted on: 05/15/05 10:58pm
By: LostPuppy
thanks for the help , i got it all working nicly
You can see it running at http://www.thenakedgeek.com/lan2/ , our actual geeklog site is at http://www.thenakedgeek.com/
it was easier then i thought it would be , just used if statements USERNAME == "" dont else do , kinda thing