storing info in a .txt file
Posted: Fri Mar 19, 2004 6:58 pm
This is the code that I have already done.
What I want to do with it is to take the
and store it on a .txt file so it has a record of what the % is for people.
I tried using the fopen,fwrite,fclose functions but I just can't seem to get them to work. Also how would I be able to have a top 10 list of the highest %'s. Hopefully this makes sense.
-Peyce
Code: Select all
<?php
$value1=$_GETї'value1'];
$value2=$_GETї'value2'];
$value3=$_GETї'value3'];
$value4=$_GETї'value4'];
$username=$_GETї'username'];
$total1=(($value1 + $value2 + $value3) / $value4);
$total2=$total1 * 10;
echo "<font face=verdana size=2 color=red>{$_GETї'username']}</font><br>";
echo "<font face=verdana size=2>Games Won </font><br>";
echo "<font face=verdana size=2 color=red>{$_GETї'value1']}</font><br>";
echo "<font face=verdana size=2>Games lost by someone reaching 100 mojo</font> <br>";
echo "<font face=verdana size=2 color=red>{$_GETї'value2']}</font><br>";
echo "<font face=verdana size=2>Games lost by zero </font> <br>";
echo "<font face=verdana size=2 color=red>{$_GETї'value3']}</font><br>";
echo "<font face=verdana size=2>Games Played</font> <br>";
echo "<font face=verdana size=2 color=red>{$_GETї'value4']}</font><br>";
echo "<font face=verdana size=2>Percent of the time you/someone quit </font><br>";
echo "<font face=verdana size=2 color=red>{$total2}%</font>";
?>Code: Select all
$total2 and $usernameI tried using the fopen,fwrite,fclose functions but I just can't seem to get them to work. Also how would I be able to have a top 10 list of the highest %'s. Hopefully this makes sense.
-Peyce