Jump to content

phpgru

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

phpgru's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Greetings well ive found the error and correct it but still the formate is unmanaged it is not in tabular form.looking forward for your kind repsonse. regards Net_Spy
  2. thanks for your response well i did as you said to me but im getting this error message afte modification Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\wamp\www\test\test.php on line 75 im looking for your kind response. Regards Net_Spy
  3. thankz AndyB for your reply.. but i could get your point cause im noob in php .i could not figure out where to modify and add these lines to be honest.im sure it will resovle my issue and display the output in tabular form being within same page i can add info and at the same time it will be displaying the result below in tabular. Regards Net_Spy
  4. here is the correct formate from which the data will be read and write. # 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 | i want this file to be display in tabular form i mean in table.each must be in diffrent column im sure you guys get point what i mean. Regards Net_Spy
  5. 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
  6. Greetings to all im try to do is that to read a text file and display in same page when i fill the input feilds and press save button it should append the data at the end.Im not a codder so can figure it out. senerio is that i've a text file which is having MAC address and IP and user nameof my clients now all i want to give a web access to my client since im noon PHP so i dont from here to get start. the page will contains the information fileds like Macaddress: Ipaddress: user name: save button. mean while it must display that file data on same page on upper portion for input fields and below is the display data looks like 00:af:33:e4:45 192.168.0.1 test 00:af:36:f4:20 192.168.0.2 test2 ...... so on,it must display the data in tabular form like a grid.Im sure you guys got my point.Looking forward for your kind response. Regards Net_Spy
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.