Whatnot
04-20-2012, 01:10 PM
how do I go about putting a popup field
say it like this the nick come back empty so if it does I want user to put in a nick next to Guest_ by using a popup
if ($nickname=="") {
$nickname = "Guest_";
}
myfayt
04-20-2012, 01:15 PM
As in a little alert box that says a message? if so that's Javascript.
Whatnot
04-20-2012, 02:25 PM
like if the nick null a box popup then u put a nick in
Whatnot
04-20-2012, 07:57 PM
other thing I can think of is adding randoms numbers how would I do that ?
if ($nickname=="") {
$nickname = "Guest_(.Rand 100/100000)";
}
Fou-Lu
04-20-2012, 08:51 PM
if (empty($nickname))
{
$nickname = 'Guest_' . rand(100, 100000);
}
Although you'd probably be better off pulling off of time.
As for a popup, as mentioned that is not PHP, its client side technology like Javascript.