simulastral Posted June 11, 2007 Share Posted June 11, 2007 Alright guys, so the issue is that I cannot seem to get this script to show any results in IE7 even when I know they should show up. The same search on the very same page in FF2 works perfectly. Sorry for posting the script like this. I am new to php, and new to this forum. Thanks a lot! <?php if (isset($_POST['search'])) { include('db_connect.php'); include('sec_script.php'); $product = escape_data($_POST['product']); $query = "SELECT id, productname, other, address FROM products WHERE MATCH (productname) AGAINST ('$product') ORDER BY productname"; $result = @mysql_query ($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $id=$row['id']; $other=$row['other']; //Open Review DIV echo '<div style="padding-bottom:15px; padding-right:25px; ">'; echo '<h1 style="text-align:left; font-size:16px; border-bottom:solid black 1px;">'.$row['productname'].'</h1>'; //This is the section that deals with finding and averaging the ratings for the product being listed. $overall=0; $num_reviews=0; $query_rating="SELECT overall FROM customer_reviews WHERE product_id=$id"; $result2=@mysql_query($query_rating); while ($row = mysql_fetch_array($result2, MYSQL_ASSOC)) { $overall=$overall+$row['overall']; $num_reviews=$num_reviews+1; } $num_rows = mysql_num_rows($result2); if($num_rows!=0) { $stars=round($overall/$num_rows); include('stars.php'); if ($num_reviews>1) { echo ' Based on '.$num_reviews.' reviews.'; } else { echo ' Based on '.$num_reviews.' review.'; } } //END RATING SECTION //This prints the comment echo '<p>'.$other.'</p>'; //This prints the Feedback links/icons echo '<p><a style="text-decoration:none;" href="make_comment.php?id='.$id.'"><img style="border:none;" src="images/feedback.gif"</img>Leave feedback </a></p>'; echo '<p><a style="text-decoration:none;" href="comments.php?id='.$id.'"><img style="border:none;" src="images/view_feedback.gif"</img>View feedback from others</a></p>'; //Close the review DIV echo'</div><br>'; } //Check to see if there were no returned results, and re-print the search box and error message $numrows_main = mysql_num_rows ($result); if ($numrows_main==0) { echo '<p>Product Search: </p><form action="search.php" method="post"><input name="product" type="text" /> <input type="submit" name="search" value="search" /></form><p>Your search returned no results. Please feel free to search again!</p>'; } mysql_free_result ($result); mysql_close(); //END main IF } else { echo '<p style="margin-bottom:0px;">Product Search: </p><form action="search.php" method="post"><input name="product" type="text" /> <input type="submit" name="search" value="search" /></form>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/55168-please-help-ie7-not-working/ Share on other sites More sharing options...
simulastral Posted June 11, 2007 Author Share Posted June 11, 2007 ok, update: when I put a simple echo under "while ($row = mysql_fetch_array($result, MYSQL_ASSOC))" the echo is never executed on a valid search.. However, if I perform an invalid search the form re-appears as it should. Does this mean that there is something wrong with my mysql in IE? Quote Link to comment https://forums.phpfreaks.com/topic/55168-please-help-ie7-not-working/#findComment-272693 Share on other sites More sharing options...
simulastral Posted June 11, 2007 Author Share Posted June 11, 2007 Alright, this is super buggy... there has to be a problem with my script. When I select a search from the previous search thing that pops up below the text field, SOMETIMES that causes the records to show up!! But, not everytime.. Works everytime perfectly in firefox. What is going on here? Quote Link to comment https://forums.phpfreaks.com/topic/55168-please-help-ie7-not-working/#findComment-272695 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.