What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » why doesn't this work!!!

why doesn't this work!!!
Author: Message:
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
35 / Male / Flag
Joined: Feb 2003
O.P. RE: why doesn't this work!!!
code:
<?php

include "sql.php";
include "header.php";
$sql = "SELECT * FROM posts WHERE MATCH (Subject,Text) AGAINST('".$search."')";
$rs=mysql_query($sql,$conn);
mysql_error($conn);
echo "<div id='blogcontainer'>";
echo "<div id='blogtitle'>Search Results</div>";
echo "<div id='blogcontent'>You searched for <b>".$search."</b>, these words have been highlighted in the results below</div>";


while ($row = mysql_fetch_array($rs)) {
$terms = array();
$terms = explode(" ", $search);
foreach ($terms as $value) {
$text = $row["Text"];
$text = str_replace($value, "<span style='background-color: #FFFF00'>$value</span>", $text);
}
echo "<div id='blogtitle'>".$row["Subject"]."</div>";
echo "<span class='blogcontent'>";
echo $text;
echo "</span>";
echo "<div id='blogfoot'>Posted by ".$row["User"]." on ".$row["time"]." | <a href='view.php?newsid=".$row["newsid"]."'>Comment</a></div>";

}

echo "</div>";
include "footer.php";
?>
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
07-12-2005 11:04 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
why doesn't this work!!! - by saralk on 07-12-2005 at 10:54 AM
RE: why doesn't this work!!! - by Eljay on 07-12-2005 at 10:57 AM
RE: why doesn't this work!!! - by saralk on 07-12-2005 at 11:00 AM
RE: why doesn't this work!!! - by Eljay on 07-12-2005 at 11:02 AM
RE: why doesn't this work!!! - by saralk on 07-12-2005 at 11:04 AM
RE: why doesn't this work!!! - by Chris.1 on 07-12-2005 at 01:29 PM
RE: why doesn't this work!!! - by saralk on 07-12-2005 at 01:36 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