What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP parsing certain lines of a text file

PHP parsing certain lines of a text file
Author: Message:
Jimbo
Veteran Member
*****

Avatar

Posts: 1650
Reputation: 18
31 / Male / Flag
Joined: Jul 2006
O.P. RE: PHP parsing certain lines of a text file
Thanks again nanafreak :)

As you seem to be a php genius, I have something else you may be able to solve. ;)

I am trying to query a database using the following code (censored):
PHP code:
<?php echo '<table class="sortable2" id="reports" name="reports">
<tr>
<th><font face="Arial, Helvetica, sans-serif" size="3">SteamID</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Server Date/Time</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Server name</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Player name</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Reason</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Reporter</font></th>
</tr>'
;
?>
 
<?
mysql_connect("***","***","****");
   
mysql_select_db("servers");
 
$search=$_POST["search"];
 
$result = mysql_query("SELECT * FROM reports4 WHERE playername LIKE '%$search%'");
 
while($r=mysql_fetch_array($result))
{  
   $steam=$r["steamid"];
   $dt=$r["datetime"];
   $pn=$r["playername"];
   $rs=$r["reason"];
   $rp=$r["reporter"];
   $sn=$r["servername"];
   
  echo "<tr><td> $steam </td><br> <td>$dt </td><td>$sn</td><td>$pn</td><td>$rs</td><td>$rp</td></tr>";
}
 
?>
</table>
 
 

It works fine, however, when searching for someone who has multiple records, it finds all records, but has some huge space before they are displayed. You can try this at http://sammyservers.com/reports/ . Try searching for example "sakura", which works fine, and then try "zombie". You will see the difference.


This post was edited on 11-24-2009 at 08:15 AM by Jimbo.
11-24-2009 08:03 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
PHP parsing certain lines of a text file - by Jimbo on 11-22-2009 at 07:13 PM
RE: PHP parsing certain lines of a text file - by John Anderton on 11-22-2009 at 07:22 PM
RE: PHP parsing certain lines of a text file - by prashker on 11-22-2009 at 07:59 PM
RE: PHP parsing certain lines of a text file - by Jimbo on 11-23-2009 at 12:07 AM
RE: PHP parsing certain lines of a text file - by NanaFreak on 11-23-2009 at 12:36 AM
RE: PHP parsing certain lines of a text file - by Jimbo on 11-23-2009 at 11:45 PM
RE: PHP parsing certain lines of a text file - by NanaFreak on 11-24-2009 at 12:32 AM
RE: PHP parsing certain lines of a text file - by Jimbo on 11-24-2009 at 08:03 AM
RE: PHP parsing certain lines of a text file - by NanaFreak on 11-24-2009 at 08:40 AM
RE: PHP parsing certain lines of a text file - by WDZ on 11-24-2009 at 09:05 AM
RE: PHP parsing certain lines of a text file - by Jimbo on 11-24-2009 at 03:22 PM
RE: PHP parsing certain lines of a text file - by NanaFreak on 11-25-2009 at 12:38 AM
RE: RE: PHP parsing certain lines of a text file - by Jimbo on 11-25-2009 at 07:57 AM
RE: PHP parsing certain lines of a text file - by John Anderton on 11-25-2009 at 06:29 AM
RE: PHP parsing certain lines of a text file - by NanaFreak on 11-25-2009 at 09:24 AM
RE: PHP parsing certain lines of a text file - by segosa on 12-14-2009 at 11:15 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On