www.webdeveloper.com
Results 1 to 7 of 7

Thread: issue with Firefox Browswer

  1. #1
    Join Date
    Feb 2011
    Posts
    177

    Exclamation issue with Firefox Browswer

    I have created a site and it works across all browsers. When I open the page in Firefox the first page works but then when I click on the link to go to more details about the product then it doesn't show anything (Once in a while one product will show the rest wont) any ideas on what is happening?

    Below is the code
    First page
    PHP Code:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      if (
    PHP_VERSION 6) {
        
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch (
    $theType) {
        case 
    "text":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;    
        case 
    "long":
        case 
    "int":
          
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case 
    "double":
          
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case 
    "date":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;
        case 
    "defined":
          
    $theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
          break;
      }
      return 
    $theValue;
    }
    }

    $currentPage $_SERVER["PHP_SELF"];

    $maxRows_Recordset1 10;
    $pageNum_Recordset1 0;
    if (isset(
    $_GET['pageNum_Recordset1'])) {
      
    $pageNum_Recordset1 $_GET['pageNum_Recordset1'];
    }
    $startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;


    $query_Recordset1 "SELECT * FROM products WHERE Category LIKE 'Nintendo DS' AND content_group LIKE 'Gaming Skins & Shells' ORDER BY product_name ASC";
    $query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
    $Recordset1 mysql_query($query_limit_Recordset1) or die(mysql_error());
    $row_Recordset1 mysql_fetch_assoc($Recordset1);

    if (isset(
    $_GET['totalRows_Recordset1'])) {
      
    $totalRows_Recordset1 $_GET['totalRows_Recordset1'];
    } else {
      
    $all_Recordset1 mysql_query($query_Recordset1);
      
    $totalRows_Recordset1 mysql_num_rows($all_Recordset1);
    }
    $totalPages_Recordset1 ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

    $queryString_Recordset1 "";
    if (!empty(
    $_SERVER['QUERY_STRING'])) {
      
    $params explode("&"$_SERVER['QUERY_STRING']);
      
    $newParams = array();
      foreach (
    $params as $param) {
        if (
    stristr($param"pageNum_Recordset1") == false && 
            
    stristr($param"totalRows_Recordset1") == false) {
          
    array_push($newParams$param);
        }
      }
      if (
    count($newParams) != 0) {
        
    $queryString_Recordset1 "&" htmlentities(implode("&"$newParams));
      }
    }
    $queryString_Recordset1 sprintf("&totalRows_Recordset1=%d%s"$totalRows_Recordset1$queryString_Recordset1);
    ?>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Gaming Skins &amp; Shells</title>
    <style type="text/css">
    @import url("CSS/style.css");
    @import url("style/style.css");
    @import url("style/master.css");
    </style>
    </head>

    <body>
    <br>
    <div id="mainlayoutwrapper">
      <div id="header"><?php include_once('template_header.php')?>
      </div>
      <div id="records">
        <table border="0">
          <tr>
            <td><?php if ($pageNum_Recordset1 0) { // Show if not first page ?>
              <a href="<?php printf("%s?pageNum_Recordset1=%d%s"$currentPage0$queryString_Recordset1); ?>">First</a>
              <?php // Show if not first page ?></td>
            <td><?php if ($pageNum_Recordset1 0) { // Show if not first page ?>
              <a href="<?php printf("%s?pageNum_Recordset1=%d%s"$currentPagemax(0$pageNum_Recordset1 1), $queryString_Recordset1); ?>">Previous</a>
            <?php // Show if not first page ?></td>
            <td><?php if ($pageNum_Recordset1 $totalPages_Recordset1) { // Show if not last page ?>
              <a href="<?php printf("%s?pageNum_Recordset1=%d%s"$currentPagemin($totalPages_Recordset1$pageNum_Recordset1 1), $queryString_Recordset1); ?>">Next</a>
              <?php // Show if not last page ?></td>
            <td><?php if ($pageNum_Recordset1 $totalPages_Recordset1) { // Show if not last page ?>
              <a href="<?php printf("%s?pageNum_Recordset1=%d%s"$currentPage$totalPages_Recordset1$queryString_Recordset1); ?>">Last</a>
              <?php // Show if not last page ?></td>
          </tr>
        </table>
        <p>Records <?php echo ($startRow_Recordset1 1?> to <?php echo min($startRow_Recordset1 $maxRows_Recordset1$totalRows_Recordset1?> of <?php echo $totalRows_Recordset1 ?> </p>
      </div>
      <div id="leftsidebar">Content for  id "leftsidebar" Goes Here</div>
      <div id="maincontent">
        <table >
          <tr>
            <?php
    $Recordset1_endRow 
    0;
    $Recordset1_columns 2// number of columns
    $Recordset1_hloopRow1 0// first row flag
    do {
        if(
    $Recordset1_endRow == 0  && $Recordset1_hloopRow1++ != 0) echo "<tr>";
       
    ?>
            <td><div id="masterwrapper">
              <div id="masterheader"><a href="products.php?recordID=<?php echo $row_Recordset1['product_name']; ?>"><?php echo $row_Recordset1['product_name']; ?>&nbsp;</a></div>
              <div id="masterpicture"><img style="border:#666 1px solid;" src="inventory_images/small/<?php echo $row_Recordset1['main_image']; ?>" alt="<?php echo $row_Recordset1['main_image']; ?>" width="77" height="102" border="1" /></div>
              <div id="masterdetails"><?php echo $row_Recordset1['packing_slip_desc']; ?></div>
              <div id="masterbuynow">
                <form id="form1" name="form1" method="post" action="cart.php">
                  $
                  <?php echo $row_Recordset1['price']; ?>
                  </form>
                </div>
            </div></td>
            <?php  $Recordset1_endRow++;
    if(
    $Recordset1_endRow >= $Recordset1_columns) {
      
    ?>
          </tr>
          <?php
     $Recordset1_endRow 
    0;
      }
    } while (
    $row_Recordset1 mysql_fetch_assoc($Recordset1));
    if(
    $Recordset1_endRow != 0) {
    while (
    $Recordset1_endRow $Recordset1_columns) {
        echo(
    "<td>&nbsp;</td>");
        
    $Recordset1_endRow++;
    }
    echo(
    "</tr>");
    }
    ?>
        </table>
      </div>
      <div id="footer"><?php include_once ('template_footer.php')?>

      </div>
    </div>
    <p>&nbsp;</p>
    </body>
    </html>
    <?php
    mysql_free_result
    ($Recordset1);
    ?>
    Last edited by shutterbug; 05-31-2011 at 12:00 PM.

  2. #2
    Join Date
    Feb 2011
    Posts
    177

    Exclamation This is the product page Code that wont work

    PHP Code:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function 
    GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
    {
      if (
    PHP_VERSION 6) {
        
    $theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      }

      
    $theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

      switch (
    $theType) {
        case 
    "text":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;    
        case 
    "long":
        case 
    "int":
          
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case 
    "double":
          
    $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case 
    "date":
          
    $theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
          break;
        case 
    "defined":
          
    $theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
          break;
      }
      return 
    $theValue;
    }
    }

    $maxRows_DetailRS1 10;
    $pageNum_DetailRS1 0;
    if (isset(
    $_GET['pageNum_DetailRS1'])) {
      
    $pageNum_DetailRS1 $_GET['pageNum_DetailRS1'];
    }
    $startRow_DetailRS1 $pageNum_DetailRS1 $maxRows_DetailRS1;

    $colname_DetailRS1 "-1";
    if (isset(
    $_GET['recordID'])) {
      
    $colname_DetailRS1 $_GET['recordID'];
    }

    $query_DetailRS1 sprintf("SELECT * FROM products  WHERE product_name = %s"GetSQLValueString($colname_DetailRS1"text"));
    $query_limit_DetailRS1 sprintf("%s LIMIT %d, %d"$query_DetailRS1$startRow_DetailRS1$maxRows_DetailRS1);
    $DetailRS1 mysql_query($query_limit_DetailRS1) or die(mysql_error());
    $row_DetailRS1 mysql_fetch_assoc($DetailRS1);

    if (isset(
    $_GET['totalRows_DetailRS1'])) {
      
    $totalRows_DetailRS1 $_GET['totalRows_DetailRS1'];
    } else {
      
    $all_DetailRS1 mysql_query($query_DetailRS1);
      
    $totalRows_DetailRS1 mysql_num_rows($all_DetailRS1);
    }
    $totalPages_DetailRS1 ceil($totalRows_DetailRS1/$maxRows_DetailRS1)-1;
    ?><html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title><?php echo $row_DetailRS1['product_name']; ?></title>
    <style type="text/css">
    @import url("style/style.css");
    @import url("style/details.css");
    </style>
    </head>

    <body>
    <p>&nbsp;</p>
    <div id="mainlayoutwrapper">
      <div id="header"><?php include_once ('template_header.php')?>

      </div>
      <div id="records">Content for  id "records" Goes Here</div>
      <div id="leftsidebar">Content for  id "leftsidebar" Goes Here</div>
      <div id="maincontent">
        <div id="detailswrapper">
          <div id="detailsheader"><?php echo $row_DetailRS1['product_name']; ?></div>
          <div id="detailspicture"><img style="border:#666 1px solid;" src="inventory_images/medium/<?php echo $row_DetailRS1['main_image']; ?>" alt="<?php echo $row_DetailRS1['main_image']; ?>" width="200" height="200" border="1" /></div><div id="detailsdescription"><?php echo $row_DetailRS1['bullet_points']; ?></div>
          <div id="detailsbuynow">
              <p>$<?php echo $row_DetailRS1['price']; ?></p>
            <div id="qty">
              <p>Qty: <?php echo $row_DetailRS1['qty_available']; ?></p>
            </div>
            <div id="weight">
              <p>Product Weight<br>
                <?php echo $row_DetailRS1['weight']; ?><br>
              </p>
            </div>
          </div>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p>&nbsp;</p>
        </div>
      </div>
      <div id="footer"><?php include_once ('template_footer.php')?>

      </div>
    </div>
    <p>&nbsp;</p>
    </body>
    </html><?php
    mysql_free_result
    ($DetailRS1);
    ?>

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,925
    More often than not, if you have browser incompatibility issues, it's likely you have some invalid HTML, in which case different browsers may "guess" differently what to do (or just give up). So the first thing I'd do is run the form page through the validator to make sure there are no HTML bugs that might be causing your problems. Likewise, it's also possible that the results page is "working" but outputting invalid HTML, which should be viewable if you do a "view source" of the result page.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Feb 2011
    Posts
    177
    It does work in all browsers except Firefox. I tried doing the validate as you suggested and Check browser all with now errors. Any ideas

  5. #5
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,925
    Without knowing what is actually happening in the code, no, I don't really have any ideas. If it were my code, I would start putting in some debug output (either to the screen or the PHP error log file) to try to inspect variables and arrays of interest to see what various data looks like and to verify which conditional code is or is not being executed, trying to narrow down where the problem is.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  6. #6
    Join Date
    Feb 2011
    Posts
    177
    NogDog

    Thank you for the help. I looked around in Firefox and found that these two Encriptions were checked.
    Use SSl 3.0
    Use TLS 1.0

    Once Unchecked the site works fine. The question now becomes how do I make the site work when those options are checked. I dont want people to not visit the site because it seems like its not working because of the checks in the encriptions

  7. #7
    Join Date
    Feb 2011
    Posts
    177

    resolved Nevermind Non of that matters

    Doing it a different way so items show up

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles