View Full Version : help with popup field

04-20-2012, 02: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_";

04-20-2012, 02:15 PM
As in a little alert box that says a message? if so that's Javascript.

04-20-2012, 03:25 PM
like if the nick null a box popup then u put a nick in

04-20-2012, 08:57 PM
other thing I can think of is adding randoms numbers how would I do that ?

if ($nickname=="") {
$nickname = "Guest_(.Rand 100/100000)";

04-20-2012, 09: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.

04-21-2012, 09:08 AM
Thank you :)