greetings guys
I found this forum really good.last time i was having the same problem but it solved all is left to formate the out put.im taking few input from page and mean while it is displaying the out put below and i want to put the display below in a tubular format rite now it is not in tabular formate.
<?php
if(isset($_POST['check'])){
$check = $_POST['check'];
if($check == '1'){
$mac = $_POST['mac'];
$ip = $_POST['ip'];
$user = $_POST['user'];
$adate = $_POST['adate'];
$bdate = $_POST['bdate'];
$fh = fopen('ATT00012.txt','ab');
fwrite($fh, "$mac $ip $user $adate $bdate |\n");
fclose($fh);
}
}
?>
<html>
<head>
<title>User Details</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FF9900">
<form name="subform" action="add.php" method="post">
<input type="hidden" name="check" value="1">
<table width="364" border="1" align="center">
<tr>
<td width="174"><div align="center"><font size="2"><strong><font face="Verdana, Arial, Helvetica, sans-serif">MAC
ADDRESS</font></strong></font></div></td>
<td width="174"><div align="center">
<INPUT type="text" name="mac">
</div></td>
</tr>
<tr>
<td><div align="center"><font size="2"><strong><font face="Verdana, Arial, Helvetica, sans-serif">IP
ADDRESS</font></strong></font></div></td>
<td><div align="center">
<INPUT type="text" name="ip">
</div></td>
</tr>
<tr>
<td><div align="center"><font size="2"><strong><font face="Verdana, Arial, Helvetica, sans-serif">USERNAME</font></strong></font></div></td>
<td><div align="center">
<INPUT type="text" name="user">
</div></td>
</tr>
<tr>
<td><div align="center"><font size="2"><strong><font face="Verdana, Arial, Helvetica, sans-serif">ACTIVATE
DATE</font></strong></font></div></td>
<td><div align="center">
<INPUT type="text" name="adate">
</div></td>
</tr>
<tr>
<td><div align="center"><font size="2"><strong><font face="Verdana, Arial, Helvetica, sans-serif">BLOCK
DATE</font></strong></font></div></td>
<td><div align="center">
<INPUT type="text" name="bdate">
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<INPUT type="submit" name="submit" value="Submit">
</div></td>
</tr>
</table>
</form>
<hr>
<br>
<?php
$fh = fopen('ATT00012.txt','rb');
for ($line = fgets($fh); ! feof($fh); $line = fgets($fh)) {
$line = trim($line);
$info = explode('|', $line);
print '' . $info[0] . "<br><br>";
}
fclose($fh);
?>
<p> </p><p> </p></body>
</html>
here is the script all i want to know to formate the display which will appear below page which contains this info
# MAC ADDRESS IPADDRESS USERNAME ACTIVTE DATE BLOCK DATE|
00:06:5b:4a:20:a1 10.100.28.1 Rogers comm. 15/05/2007 |
00:16:76:21:b0:91 10.100.28.2 Shaheer khan 15/05/2007 |
4c:00:10:60:cd:2e 10.100.28.3 Imaad 15/05/2007 |
00:08:02:d3:4a:ef 10.100.28.4 Hassan 15/05/2007 |
00:09:6b:38:91:0b 10.100.28.5 Hamza bakaiy 15/05/2007 |
00:c0:26:78:06:61 10.100.28.6 Farhan fahim 15/05/2007 17/05/2007 |
00:50:04:d6:fc:95 10.100.28.7 Aamir 15/05/2007 |
looking forward for your kind response.
Regards
Net_Spy