random
| From: | Natividad Castro | Date: | Tue, 04 Jun 2002 19:56:30 +0000 |
| Subject: | random | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-19604@lists.php.net to get a copy of this message | ||
hi to all,
I have a drop down menu where users will select a word. After they submit
it, I will generate a code number where I want to display the first three
characters of the word they selected follow by Month and Date and three
number that will be generating randomly.
I don't have any problem displaying the MM/DD and the three numbers, but I
don't know how to get the first three characters.
//first page
<select name="word">
//second page
$firsThreecharacter = $word;
//here is MM/DD
$date = gmDate("md");
$number = rand(100,999);
$code_number = $str_char.$date.$number;
echo $code_number." ";
Any help is greatly appreciate it
Many thanks in advanced
Nato