RE: [PHP] Not too simple, i hope

From: Date: Sun, 12 Aug 2001 18:22:08 +0000
Subject: RE: [PHP] Not too simple, i hope
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62324@lists.php.net to get a copy of this message
http://www.php.net/manual/en/function.fopen.php http://www.php.net/manual/en/function.fputs.php http://www.php.net/manual/en/function.fclose.php -----Original Message----- From: Kyle Smith [mailto:dbzno1fan@hotmail.com] Sent: Sunday, August 12, 2001 10:16 PM To: php-general@lists.php.net Subject: [PHP] Not too simple, i hope ok ive managed to get a random line script to work now, (please dont hurt me) im asking for a little help! This is the script im using <?php randomline("poop.txt"); function randomline($filename) { $file = file($filename); srand((double)microtime()*1000000); while ($randomquote == "") { $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); } echo $randomquote; } ?> And poop.txt looks like Random quote "umm, stuff!" Random quote "smelly pants" can someone please show me how to make a form which can write to this text file.... please! -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man! ICQ: 115852509 MSN: dbzno1fan@hotmail.com AIM: legokiller666

« previous php.general (#62324) next »