Integrate SMF to my site

Started by CokeCan, June 16, 2005, 12:52:01 AM

Previous topic - Next topic

CokeCan

I am working on a new site and I want to know if it's posible to identificate the user in the website so when he fills a form if he is registred there's:

<input type = "hidden" name = "username" value="UserName">

if he's not there's a space to add his name:

<input type = "text" name = "name" size=30 maxlength=50>

thanks idvanced!

[Unknown]

Include SSI.php, and use $user_info['username'].

-[Unknown]

Jorijn

Include? Its require? right?

<? require'../SSI.php';?>

Your username is: <? echo'$user_info['username']'; ?>

[Unknown]

For best results and portability, always use <?php not just <?.  But, yes... require is include + fatal error message on error.  It's still doing something that is usually called "including" by programmers - as that's what C and other languages call it.

-[Unknown]

CokeCan

Thanks but when I put <?php echo '$user_info['username']'; ?>

I get this error:
QuoteParse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /www/xxx/0.php on line 5

Do I have to configure something at SSI?

Jorijn

<?php echo"$user_info['username']"; ?>

Try that one

" indicates its an command

Or <?php ssi_user_info['username']; ?>

I am just being creative :P I think [Unknown] will know

Grudge

<?php echo $user_info['username']; ?>
I'm only a half geek really...

CokeCan

thanks! it's working

One more question, is it posible to redirect the user to the page that he was when he uses ssi_login(); ? it always brings him to the forum

Advertisement: