PDA

View Full Version : shoutbox help



Colin-Roberts
26-11-2006, 08:31 PM
how can i make it so only i can use my name in my shoutbox noone else the shoutbox is flatfile and can be found on my site. mysql shoutbox is being looked into.. i dont want it so that ever user has to login.. any help doing that with a flatfile or mysql one will be repped.

Swastika
26-11-2006, 08:36 PM
You still owe me 15GBP you know Colin.

Colin-Roberts
26-11-2006, 08:43 PM
yep i know.. you still want a reseller too tho? (i got one extra)

uber
26-11-2006, 08:46 PM
Can't you use an echo, so that if the username is Colin you have to enter a password?

Just a thought.

:Blobbed
26-11-2006, 08:51 PM
Just have a user system, then have $user = $name;

Colin-Roberts
26-11-2006, 08:52 PM
if $user=colin
echo""
else
echo.. i thought of that but frankly i suck at doing something like that in php.

EDIT: blobbed i dont want to do that because i doubt any friends would bother to register/login.

:Blobbed
26-11-2006, 08:55 PM
if $user=colin
echo""
else
echo.. i thought of that but frankly i suck at doing something like that in php.

no.. That wouldnt work

you would do if you where doing that


<? if($user == "Colin"){
echo "Whatever";
} else {
echo "Hello";
}
?>

Place that into a website then go to index.php?user=Colin (or what ever file you put it in and see what happens :D

Colin-Roberts
26-11-2006, 09:00 PM
hmm i think i figured out how to do that now thanx blob.
if user is colin it'll go to password protected shout form..
if not it'll just proccess as normal/

San$
26-11-2006, 09:18 PM
You could try it via IP check


<?
$ip = $_SERVER[REMOTE_ADDR];
if ($name == "Colin" & $ip = "1.1.1.1") { echo "Insert tag code"; } else { echo "You cannot use Colin"; } ?> or something

Want to hide these adverts? Register an account for free!