DaveLinger Posted July 12, 2006 Author Share Posted July 12, 2006 hokay, I rewrote it all. Here's my current code.[code]<?phpinclude('includes/config.php');include('includes/header.php');$platform = $_POST['platform'];$developer = $_POST['developer'];$publisher = $_POST['publisher'];$fletter = $_POST['fletter'];$sortby = $_POST['sort'];if (!$link = mysql_connect($sqlserver, $sqlusername, $sqlpassword)) { echo 'Could not connect to mysql'; exit;}if (!mysql_select_db($sqldatabase, $link)) { echo 'Could not select database'; exit;}if($fletter == '%'){$query="SELECT * FROM nuke_seccont WHERE secid LIKE '$platform' AND developer LIKE '$developer' AND publisher LIKE '$publisher' ORDER BY $sortby DESC";}ELSE{$query="SELECT * FROM nuke_seccont WHERE secid LIKE '$platform' AND developer LIKE '$developer' AND publisher LIKE '$publisher' AND fletter='$fletter' ORDER BY $sortby DESC";}$result = mysql_query($query) or die("Problem with the query: $query<br>" . mysql_error());while ($row = mysql_fetch_assoc()){$artid = $row['artid'];$secid = $row['secid'];$title = $row['title'];$counter = $row['counter'];echo "$artid<br>$secid<br>$title<br>$counter<br><br>";}include('includes/footer.php');?>[/code]I have discovered that if I try to echo anything before I echo the results it causes the white screen problem. Even now, no results are displayed. Any ideas? Link to comment https://forums.phpfreaks.com/topic/14306-searching-a-database-using/page/2/#findComment-56773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.