chriscloyd Posted March 28, 2007 Share Posted March 28, 2007 heres my problem my code its not returning any thing at all here my code to show the search <?php switch($_GET['p']) { case "searchnews": $keyword = $_POST['keyword']; $get_like_news = mysql_query("SELECT * FROM cegl_news WHERE username LIKE '%".$keyword."%' AND subject LIKE '%".$keyword."%' AND date LIKE '%".$keyword."%' AND message LIKE '%".$keyword."%'") or die(mysql_error()); ?> <fieldset><legend><strong>Search - Looking For <?php echo $keyword; ?></strong></legend> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="25%" class="teams">News Title</td> <td class="teams">Author</td> <td class="teams">Date</td> <td width="15%" class="teams">Commands</td> </tr> <?php while ($news = mysql_fetch_array($get_like_news)) { ?> <tr> <td width="20%" height="25" class="teams"><?php echo $news['subject']; ?></td> <td width="20%" height="25" class="teams"><div align="left"><?php echo $news['username']; ?></div></td> <td width="20%" height="25" class="teams"><?php echo $news['date']; ?></td> <td width="15%" height="25" class="teams"><form name="form1"> <select name="menu1" onChange="MM_jumpMenu('parent',this,0)"> <option selected>Commands</option> <option value="admin.php?p=editnews&id=<?php echo $news['news_id']; ?>">Edit</option> <option value="admin.php?p=movenews&id=<?php echo $news['news_id']; ?>">Move News</option> <option value="admin.php?p=deletenews&id=<?php echo $news['news_id']; ?>">Delete</option> </select> </form></td> </tr> <? } ?> </table> </fieldset> <?php break; } ?> heres the form that submitting the search <html> <form name="form1" method="post" action="admin.php?p=searchnews"> <table class="teamlinks" width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="7%">Search</td> <td width="60%"><input name="keyword" type="text" id="keyword"></td> <td width="33%"><input type="submit" name="Submit" value="Search"></td> </tr> </table> </form> </html> Quote Link to comment Share on other sites More sharing options...
DeathStar Posted March 28, 2007 Share Posted March 28, 2007 Try post... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.