/    Sign up×
Community /Pin to ProfileBookmark

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

[code=php]
<?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”, $currentPage, 0, $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”, $currentPage, max(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”, $currentPage, min($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);
?>
[/code]

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@shutterbugauthorMay 31.2011 — [code=php]
<?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);
?>
[/code]
Copy linkTweet thisAlerts:
@NogDogMay 31.2011 — 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 [url=http://validator.w3c.org]validator[/url] 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.
Copy linkTweet thisAlerts:
@shutterbugauthorJun 01.2011 — 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
Copy linkTweet thisAlerts:
@NogDogJun 01.2011 — 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.
Copy linkTweet thisAlerts:
@shutterbugauthorJun 01.2011 — 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
Copy linkTweet thisAlerts:
@shutterbugauthorJun 01.2011 — Doing it a different way so items show up
×

Success!

Help @shutterbug spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...