Hello I have a script that needs to make a schedule. When i press the button it comes out with the same answer everytime. here is the code....
<?
require('head.php');
echo $head;
srand(time(10));
$randmon = (rand()%2);
if($randmon == 0)
{
$mon = $name1;
}
if($randmon == 1)
{
$mon = $name2;
}
srand(time(9));
$randtue = (rand()%2);
if($randtue == 0)
{
$tues = $name1;
}
if($randtue == 1)
{
$tues = $name2;
}
srand(time(10));
$randwed = (rand()%2);
if($randwed == 0)
{
$wed = $name1;
}
if($randwed == 1)
{
$wed = $name2;
}
srand(time(10));
$randthur = (rand()%2);
if($randthur == 0)
{
$thur = $name1;
}
if($randthur == 1)
{
$thur = $name2;
}
srand(time(10));
$randfri = (rand()%2);
if($randfri == 0)
{
$fri1 = $name1;
$fri2 = $name2;
}
if($randfri == 1)
{
$fri1 = $name2;
$fri2 = $name1;
}
srand(time(10));
$randsat = (rand()%2);
if($randsat == 0)
{
$sat1 = $name1;
$sat2 = $name2;
}
if($randsat == 1)
{
$sat1 = $name2;
$sat2 = $name1;
}
srand(time(10));
$randsun = (rand()%3);
if($randsun == 0)
{
$sun1 = $name1;
$sun2 = $name2;
}
if($randsun == 1)
{
$sun1 = $name2;
$sun2 = $name1;
}
echo "
<table>
<tr>
<td>
Mon.
</td>
<td>
Tues.
</td>
<td>Wed.</td>
<td>Thur.</td>
<td>Fri</td>
<td>Sat.</td>
<td>Sun.</td>
</tr>
<tr>
<td>$mon</td>
<td>$tues</td>
<td>$wed</td>
<td>$thur</td>
<td>$fri1<br>$fri2</td>
<td>$sat1<br>$sat2</td>
<td>$sun1<br>$sun2</td>
</tr>
</table>
";
?>
but i always get th same thing the addy is...
http://tuna.port-aransas.k12.tx.us/~brooks/fisher/sched1.php
select 2 employee's and enter amy names and you will see what im talking about..
thanks alot for any help you can give me.
Brooks