PDA

View Full Version : forms on main page


sweetmercifulcr
01-08-2003, 08:25 PM
hey guys. I got a request for a hack, I searched for it but came up with nothing. Sorry if it's out there, if it is link me please.

on my main page, I have forms, and one of the input fields is name. I think it would be cool if a memeber is loged in, or a session is found, inside that field is their username. If you understood that... :smoke:

Xenon
01-09-2003, 11:38 AM
have you requiread your global.php in your mainpage?

if yes, just use $bbuserinfo[username] as the default value of the form.

if no, reuire it first and then do as above

Logik
01-09-2003, 12:37 PM
Xenon is a PHP God.. Cant forget hellsatan though. And arunan. And all them others :OI

sweetmercifulcr
01-10-2003, 02:10 AM
Originally posted by Xenon
have you requiread your global.php in your mainpage?

if yes, just use $bbuserinfo[username] as the default value of the form.

if no, reuire it first and then do as above
I thought about this, however never tried it. I wasn't even sure what to put as the value of the form, but knew I'd have to require some file (I'm knew to vb)

thanks though, I'll give it a shot.

Edit: gave it a shot, got this:

Warning: Unable to access ./admin/config.php in /home/virtual/site10/fst/var/www/html/forum/global.php on line 129

Auero
01-10-2003, 02:43 AM
Hmm, don't see why you're getting that error. From what I understand of Xenon's post you shouldn't have actually edited the global.php file. Only added $bbuserinfo[username] into the forumhome_xxxx template.

Xenon
01-10-2003, 10:32 PM
instead of just require('forum/global.php');

try this one:chdir('forum');
require('global.php');