Jump to content

HDFilmMaker2112

Members
  • Posts

    547
  • Joined

  • Last visited

    Never

Everything posted by HDFilmMaker2112

  1. Do you have session_start(); anywhere in your code? I'm not seeing in the code you posted. You need it in each document that sets or calls a session variable.
  2. Thank you...Knew it was something obvious. I have no idea why I was using ==. Operating on limited sleep.
  3. That's the board software converting an 8 and ) into a bb smiley. Doesn't happen when you use code tags around the code.
  4. turned off looking further down on the report it says _POST['review_name'] value=no value under PHP Variables. So is it not even getting data from the form?
  5. The first page is used to submit data to second page (and also show errors if there are any with the data submitted). The second page should be retrieving the posted data and assigning that data to session should it need to refresh back to the first page to show errors. The session data is used to repopulate the form. Right now I'm typing test into the review_name variable and when the page redirects back to the form to display the error messages, that field is not populated with "test". $product_id=$_GET['product']; session_start(); $error=$_SESSION['error']; $content.='<div class="product_information_text review_form"> <div class="review_header">Write a Review for '.$product_name.'</div> <form action="./review_process.php?product='.$product_id.'&p=php" method="POST"> <p class="form_item"><label>Name:</label> <input type="text" name="review_name" size="30"'; if(isset($_SESSION['review_name'])){$content.=' value="'.$_SESSION['review_name'].'"';} $content.=' />'; if($error[0]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>E-Mail:</label> <input type="text" name="review_email" size="30"'; if(isset($_SESSION['review_email'])){$content.=' value="'.$_SESSION['review_email'].'"';} $content.=' />'; if($error[2]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Location:</label> <input type="text" name="review_location" size="30"'; if(isset($_SESSION['review_location'])){$content.=' value="'.$_SESSION['review_location'].'"';} $content.=' />'; if($error[3]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Describe Yourself:</label> <input type="text" name="review_describe" size="30"'; if(isset($_SESSION['review_describe'])){$content.=' value="'.$_SESSION['review_describe'].'"';} $content.=' />'; if($error[4]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Review Title:</label> <input type="text" name="review_title" size="30"'; if(isset($_SESSION['review_title'])){$content.=' value="'.$_SESSION['review_title'].'"';} $content.=' />'; if($error[1]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Best Use of Product:</label> <input type="text" name="review_best_use" size="30"'; if(isset($_SESSION['review_best_use'])){$content.=' value="'.$_SESSION['review_best_use'].'"';} $content.=' />'; if($error[5]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Product Pros:</label> <input type="text" name="review_pros" size="30"'; if(isset($_SESSION['review_pros'])){$content.=' value="'.$_SESSION['review_pros'].'"';} $content.=' />'; if($error[6]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Product Cons:</label> <input type="text" name="review_cons" size="30"'; if(isset($_SESSION['review_cons'])){$content.=' value="'.$_SESSION['review_cons'].'"';} $content.=' />'; if($error[7]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </p> <p class="form_item"><label>Product Rating:</label><br /> <div class="rating_radio"><input type="radio" name="review_product_rating" value="1"'; if(isset($_SESSION['review_product_rating']) && $_SESSION['review_product_rating']=="1"){$content.='checked';} $content.=' /> <br />1</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="2"'; if(isset($_SESSION['review_product_rating']) && $_SESSION['review_product_rating']=="2"){$content.='checked';} $content.=' /> <br />2</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="3"'; if(isset($_SESSION['review_product_rating']) && $_SESSION['review_product_rating']=="3" || !isset($_SESSION['review_product_rating'])){$content.='checked';} $content.=' /> <br />3</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="4"'; if(isset($_SESSION['review_product_rating']) && $_SESSION['review_product_rating']=="4"){$content.='checked';} $content.=' /> <br />4</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="5"'; if(isset($_SESSION['review_product_rating']) && $_SESSION['review_product_rating']=="5"){$content.='checked';} $content.=' /> <br />5</div> <div class="worst">(Worst)</div><div class="best">(Best)</div> </p> <p> </p> <p class="form_item"><label>Comments on Product:'; if($error[7]=="1"){$content.=' <span class="red">This field is required.</span>';} $content.=' </label><br /> <textarea name="review_text" rows="10" cols="60">'; if(isset($_SESSION['review_text'])){$content.=$_SESSION['review_text'];} $content.='</textarea> </p> <p><input type="submit" value="Submit" name="Submit" /></p> </form> </div> '; session_unset(); session_destroy(); session_start(); $product_id=$_GET['product']; $review_name=$_POST['review_name']; $_SESSION['review_name']==$review_name; $review_name = stripslashes($review_name); $review_name = mysql_real_escape_string($review_name); if($review_name==""){ $error0=1; } else{ $error0=0; } $review_title=$_POST['review_title']; $_SESSION['review_title']==$review_title; $review_title = stripslashes($review_title); $review_title = mysql_real_escape_string($review_title); if($review_title==""){ $error1=1; } else{ $error1=0; } $review_email=$_POST['review_email']; $_SESSION['review_email']==$review_email; $review_email = stripslashes($review_email); $review_email = mysql_real_escape_string($review_email); if($review_email==""){ $error2=1; } else{ $error2=0; } $review_location=$_POST['review_location']; $_SESSION['review_location']==$review_location; $review_location = stripslashes($review_location); $review_location = mysql_real_escape_string($review_location); if($review_location==""){ $error3=1; } else{ $error3=0; } $review_describe=$_POST['review_describe']; $_SESSION['review_describe']==$review_describe; $review_describe = stripslashes($review_describe); $review_describe = mysql_real_escape_string($review_describe); if($review_describe==""){ $error4=1; } else{ $error4=0; } $review_best_use=$_POST['review_best_use']; $_SESSION['review_best_use']==$review_best_use; $review_best_use = stripslashes($review_best_use); $review_best_use = mysql_real_escape_string($review_best_use); if($review_best_use==""){ $error5=1; } else{ $error5=0; } $review_pros=$_POST['review_pros']; $_SESSION['review_pros']==$review_pros; $review_pros = stripslashes($review_pros); $review_pros = mysql_real_escape_string($review_pros); if($review_pros==""){ $error6=1; } else{ $error6=0; } $review_cons=$_POST['review_cons']; $_SESSION['review_cons']==$review_cons; $review_cons = stripslashes($review_cons); $review_cons = mysql_real_escape_string($review_cons); if($review_cons==""){ $error7=1; } else{ $error7=0; } $review_product_rating=$_POST['review_product_rating']; $_SESSION['review_product_rating']=$review_product_rating; $review_product_rating = stripslashes($review_product_rating); $review_product_rating = mysql_real_escape_string($review_product_rating); $review_text=$_POST['review_text']; $_SESSION['review_text']==$review_text; $review_text = stripslashes($review_text); $review_text = mysql_real_escape_string($review_text); if($review_text==""){ $error8=1; } else{ $error8=0; } $review_show="n"; date_default_timezone_set('US/Eastern'); $review_date = date("F j, Y, g:i a T"); $error="".$error0."".$error1."".$error2."".$error3."".$error4."".$error5."".$error6."".$error7."".$error8.""; if($_GET['p']=="php"){ if($error!=="000000000"){ $_SESSION['error']=$error; //header("Location: ./store.php?product=".$product_id."&write=review"); echo $_SESSION['review_name']; } else{ $sql="INSERT INTO $tbl_name3 (product_id, review_show, review_title, review_email, review_name, review_location, review_date, review_describe, review_best_use, review_pros, review_cons, review_product_rating, review_text) VALUES ('$product_id', '$review_show', '$review_title', '$review_email', '$review_name', '$review_location', '$review_date', '$review_describe', '$review_best_use', '$review_pros', '$review_cons', '$review_product_rating', '$review_text')"; mysql_query($sql); header("Location: ./store.php?product=".$product_id."&reviews=thankyou"); } } On this second page echo $_SESSION['review_name']; returns nothing, when changed to $_SESSION['review_product_rating']; it returns the rating I selected in the form. I'm probably missing something obvious here.
  6. insertGoTo = "index.php? ".$sbninesven." "; add periods before and after the variable.
  7. The below should choose the radio button that is set by the $_SESSION variable or default to 3. However, it's defaulting to 1. $content.=' <p class="form_item"><label>Product Rating:</label><br /> <div class="rating_radio"><input type="radio" name="review_product_rating" value="1"'; if(isset($review_product_rating) && $review_product_rating=="1"){$content.='checked';} $content.=' /> <br />1</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="2"'; if(isset($review_product_rating) && $review_product_rating=="2"){$content.='checked';} $content.=' /> <br />2</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="3"'; if(isset($review_product_rating) && $review_product_rating=="3" || !isset($review_product_rating)){$content.='checked';} $content.=' /> <br />3</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="4"'; if(isset($review_product_rating) && $review_product_rating=="4"){$content.='checked';} $content.=' /> <br />4</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="5"'; if(isset($review_product_rating) && $review_product_rating=="5"){$content.='checked';} $content.=' /> <br />5</div> <div class="worst">(Worst)</div><div class="best">(Best)</div> </p> I'm figuring it's because it's multiple if statement (with no elseif) so it's evaluating the first if and being set to true. I tried changing everything else after the first one to elseif, and it's throwing an unexpected T_ELSEIF error.
  8. That was my issue, it seems like... The miss matched variable names.
  9. And the second script is trying to reference the value using wow.... I forgot that the $_GET[] is supposed to be the text before the equal sign. I'll fixing that as soon as my host comes back up... it managed to crash as soon as I start trying to get this working.
  10. Wouldn't that put all the form's values in the URL? I don't want that. I just want the product_id carried in the URL. I did notice I forgot the method attribute and added it as POST. Still the same issue.
  11. The below script for some reason isn't passing along the product_id variable. $product_id=$_GET['product']; session_start(); $error=$_SESSION['error']; $content.='<div class="product_information_text review_form"> <div class="review_header">Write a Review for '.$product_name.'</div> <form action="./review_process.php?product='.$product_id.'"> <p class="form_item"><label>Name:</label> <input type="text" name="review_name" size="30" /></p>'; if(isset($error[0])){$content.='<p class="red">This field is required.</p>';} $content.=' <p class="form_item"><label>E-Mail:</label> <input type="text" name="review_email" size="30" /></p> <p class="form_item"><label>Location:</label> <input type="text" name="review_location" size="30" /></p> <p class="form_item"><label>Describe Yourself:</label> <input type="text" name="review_describe" size="30" /></p> <p class="form_item"><label>Review Title:</label> <input type="text" name="review_title" size="30" /></p> <p class="form_item"><label>Best Use of Product:</label> <input type="text" name="review_best_use" size="30" /></p> <p class="form_item"><label>Product Pros:</label> <input type="text" name="review_pros" size="30" /></p> <p class="form_item"><label>Product Cons:</label> <input type="text" name="review_cons" size="30" /></p> <p class="form_item"><label>Product Rating:</label><br /> <div class="rating_radio"><input type="radio" name="review_product_rating" value="1" /> <br />1</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="2" /> <br />2</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="3" checked /> <br />3</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="4" /> <br />4</div> <div class="rating_radio"><input type="radio" name="review_product_rating" value="5" /> <br />5</div> <div class="worst">(Worst)</div><div class="best">(Best)</div> </p> <p> </p> <p class="form_item"><label>Comments on Product:</label><br /> <textarea name="review_text" rows="10" cols="60"></textarea> </p> <p><input type="submit" value="Submit" name="Submit" /></p> </form> </div> '; session_unset(); session_destroy(); That code shows the proper product=$product_id value in the form action tag. $product_id=$_GET['product_id']; $review_name=$_POST['review_name']; $review_name = stripslashes($review_name); $review_name = mysql_real_escape_string($review_name); if($review_name==""){ $error0=1; } else{ $error0=0; } $review_title=$_POST['review_title']; $review_title = stripslashes($review_title); $review_title = mysql_real_escape_string($review_title); if($review_title==""){ $error1=1; } else{ $error1=0; } $review_email=$_POST['review_email']; $review_email = stripslashes($review_email); $review_email = mysql_real_escape_string($review_email); if($review_email==""){ $error2=1; } else{ $error2=0; } $review_location=$_POST['review_location']; $review_location = stripslashes($review_location); $review_location = mysql_real_escape_string($review_location); if($review_location==""){ $error3=1; } else{ $error3=0; } $review_describe=$_POST['review_describe']; $review_describe = stripslashes($review_describe); $review_describe = mysql_real_escape_string($review_describe); if($review_describe==""){ $error4=1; } else{ $error4=0; } $review_best_use=$_POST['review_best_use']; $review_best_use = stripslashes($review_best_use); $review_best_use = mysql_real_escape_string($review_best_use); if($review_best_use==""){ $error5=1; } else{ $error5=0; } $review_pros=$_POST['review_pros']; $review_pros = stripslashes($review_pros); $review_pros = mysql_real_escape_string($review_pros); if($review_pros==""){ $error6=1; } else{ $error6=0; } $review_cons=$_POST['review_cons']; $review_cons = stripslashes($review_cons); $review_cons = mysql_real_escape_string($review_cons); if($review_cons==""){ $error7=1; } else{ $error7=0; } $review_product_rating=$_POST['review_product_rating']; $review_product_rating = stripslashes($review_product_rating); $review_product_rating = mysql_real_escape_string($review_product_rating); $review_text=$_POST['review_text']; $review_text = stripslashes($review_text); $review_text = mysql_real_escape_string($review_text); if($review_text==""){ $error8=1; } else{ $error8=0; } $review_show="n"; date_default_timezone_set('US/Eastern'); $review_date = date("F j, Y, g:i a T"); $error="".$error0."".$error1."".$error2."".$error3."".$error4."".$error5."".$error6."".$error7."".$error8.""; if($error!=="000000000"){ session_start(); $_SESSION['error']=$error; header("Location: ./store.php?product=".$product_id."#review"); } else{ $sql="INSERT INTO $tbl_name3 (product_id, review_show, review_title, review_email, review_name, review_location, review_date, review_describe, review_best_use, review_pros, review_cons, review_product_rating, review_text) VALUES ('$product_id', '$review_show', '$review_title', '$review_email', '$review_name', '$review_location', '$review_date', '$review_describe', '$review_best_use', '$review_pros', '$review_cons', '$review_product_rating', '$review_text')"; mysql_query($sql); echo "Thank You for submitting your review. It should appear on the site within 48 hours."; } The above redirects to store.php?product=#review with no product id. Ideas on why?
  12. I need to round a number based on it's decimal. 3 or below should round down, 4 should round up to 5, 6 and 7 should round down to 5; 8 and 9 should round up to the next whole number. The below is returning 3 from 2.16. <?php $a=2.16; $i=round($a, 1); $b=$i; $i=explode(".", $a); $decimal=$i[1]; if($decimal < 5){ $j=floor($b); $i= $decimal > 3 ? $j + .5 : $j; echo $i; } else{ $j=ceil($b); $i= $decimal < 8 ? $j - .5 : $j; echo $i; } ?> EDIT: The explode should have been on $i not $a.
  13. I guess I didn't explain myself well enough. I'm trying to generate something like this: "Showing 1 - 3 out of 3 products" or "Showing 1 - 20 out of 25 products" I have no idea how to do that... I posted the MySQL in my previous post to show what existing code I have (which is working for pagination) to use to generate the above text.
  14. I need to come up with a script that will get the number of products under a category and return the number of products shown on each page in Showing 1-20 Products out of (total number) I have this MYSQL which I'm also using to generate pagination. $query5 = "SELECT COUNT(*) as num FROM $tbl_name WHERE product_category='$cat'"; $total_pages = mysql_fetch_array(mysql_query($query5)); $total_pages = $total_pages[num]; /* Setup vars for query. */ $targetpage = "store.php?cat=".$cat; //your file name (the name of this file) $limit = 20; //how many items to show per page $page = $_GET['page']; if($page){ $start = ($page - 1) * $limit; //first item to display on this page } else{ $start = 0; //if no page var is given, set start to 0 } The products are pulled from the database here: $sql30 = "SELECT * FROM $tbl_name WHERE product_category='$cat' LIMIT $start, $limit"; $result30 = mysql_query($sql30); I came up with one way, but it will only work when there are 20 products on the page. If there's less it won't calculate that amount.
  15. When I take that css down to a smaller width, the div doesn't actually butt up against the second div tag that .add_cart_wrapper is contained in (product_wrapper). I just made the width shorter, now take a look. It's about 60-80 pixels short of being centered in the space between "Price: $1000" and the right border. http://ghosthuntersportal.com/store.php?product=2 I had .add_cart_wrapper set to a width of 250px... now it's 200px.
  16. On this page, http://ghosthuntersportal.com/store.php?product=2, the ADD CART BUTTON text should be next to the Price, GHP#, ect. and centered within the space. style.css a:link { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:visited { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:active { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:hover { color: #FF44FF; font-weight: bold; text-decoration: none; } .admin_cp a:link { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:visited { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:active { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:hover { color: #0000FF; text-decoration: underline; font-weight: none; } .header{ width: 999px; height: 75px; border: 2px; border-color: #660066; border-style: none; border-bottom-style: solid; } .logo{ float: left; margin-top: -12px; margin-left: -3px; height: 76px; width: 460px; } .tag{ float: left; margin-top: 40px; margin-left: -453px; height: 35px; width: 460px; } .header_right{ width: 530px; height: 74px; float: left; } .header_links{ width: 350px; height: 16px; text-align: center; font-size: 12px; margin-left: 180px; } .header_links a:link{ color: #FFFFFF; text-decoration: none; } .header_links a:hover{ color: #FFFFFF; text-decoration: underline; font-weight: bold; } .ad{ margin-left: 140px; width: 390px; height: 55px; text-align: center; } .adposition{ } .adspacer{ } .adspacer2{ } .content_wrapper{ width: 995px; height: 100%; min-height: 450px; border: 2px; border-color: #660066; border-style: solid; border-top-style: none; overflow: auto; } .categories{ margin-top: -10px; margin-bottom: 3px; margin-left: -5px; font-weight: bold; font-size: 16px; text-align: center; } .links{ font-size: 14px; margin-top: 15px; margin-left: 10px; float: left; width: 165px; } .links a:link{ font-weight: bold; } .data_wrapper{ float: right; width: 815px; height: 100%; min-height: 450px; border: 2px; border-color: #660066; border-style: none; border-left-style: solid; } .search_crumbs{ height: 30px; width: 815px; margin-top: 7px; } .crumbs{ float: left; width: 400px; height: 25px; font-weight: bold; font-size: 12px; margin-left: 15px; margin-top: 5px; } .search{ float: right; width: 325px; height: 25px; text-align: right; font-weight: bold; font-size: 14px; margin-right: 15px; } .content{ height: 100%; min-height: 450px; width: 790px; margin-left: 15px; } .footer{ float: left; width: 995px; margin-top: 5px; text-align: center; font-size: 11px; clear: both; border: 7px; border-color: #000000; border-bottom-style: solid; } .content_text{ margin-top: 5px; margin-left: 55px; font-size: 15px; width: 671px; } .content_header{ font-size: 24px; text-align: center; margin-bottom: 5px; } .popular_products{ height: 145px; } .product{ float: left; text-align: center; width: 160px; margin-top: 10px; margin-left: 10px; font-size: 14px; } .product a:link{ color: #FF44FF; font-weight: bold; text-decoration: underline; } .product a:visited { color: #FF44FF; font-weight: bold; text-decoration: underline; } .product a:hover{ color: #FFFFFF; text-decoration: underline; font-weight: bold; } .product_image{ float: left; margin-top: 5px; } .product_details{ float: left; margin-left: 25px; } .product_price{ font-size: 18px; color: #CC00CC; } .product_wrapper{ margin-left: 15px; width: 700px; } .product_links_headers{ float: left; width: 785px; margin-top: 10px; margin-left: 15px; } .product_highlights_text{ font-weight: bold; font-size: 14px; margin-top: 5px; } .product_highlights_item{ font-size: 14px; margin-top: -13px; margin-left: -25px; } .product_title{ width: 775px; } .product_code{ font-size: 12px; } .rating_image{ margin-top: 3px; } .review_container{ margin-top: 10px; } .add_cart_wrapper{ float: left; width: 250px; } .contactus_links{ font-weight: bold; } .contactus_links a:link { color: #FF44FF; text-decoration: none; } .contactus_links a:visited { color: #FF44FF; text-decoration: none; } .contactus_links a:active { color: #FF44FF; text-decoration: none; } .contactus_links a:hover { color: #FFFFFF; text-decoration: none; } .product_tab{ width: 200px; text-align: center; float: left; border: 1px; border-color: #CC00CC; border-style: solid; border-collapse: collapse; } .product_tab a:link { color: #FFFFFF; text-decoration: none; } .product_tab a:visited { color: #FFFFFF; text-decoration: none; } .product_tab a:active { color: #FFFFFF; text-decoration: none; } .product_tab a:hover { color: #FFFFFF; text-decoration: none; } .product_tab_wrapper{ width: 700px; clear: both; margin-top: 320px; margin-left: 15px; } .product_information{ width: 750px; border: 1px; border-color: #CC00CC; border-style: solid; border-collapse: collapse; margin-left: 15px; clear: both; } .product_information_text{ padding: 10px; } .address{ color: #008800; margin-left: 40px; } .seventypercent{ width: 70%; } img{ border: 0px; } .center{ text-align: center; } .underline{ text-decoration: underline; } .bold{ font-weight: bold; } .italics{ font-style: italic } .eleven{ font-size: 11px; } .twelve{ font-size: 12px; } .fourteen{ font-size: 14px; } .sixteen{ font-size: 16px; } .gray{ color: #6F6F6F; } .eighteen{ font-size: 18px; } .twentyeight{ font-size: 28px; } .twentysix{ font-size: 26px; } .thirtytwo{ font-size: 32px; } .skyblue{ color: #3399FF; } .red{ color: #FF0000; } .sig{ margin-left: 50px; margin-top: 325px; } .green{ color: #008800; } .blue{ color: #000000; } .fortyfive{ width: 45%; } .sixty{ width: 60%; } .twenty{ width: 20%; } .clear{ clear: both; } <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <base href="http://ghosthuntersportal.com/" /> <title>Ghost Hunter's Portal - Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="verify-v1" content="" /> <meta name="keywords" content="ghost, hunters, hunter, ghosts, spirit, spirits, paranormal, investigation, investigator, investigators, k2, emf, meter, kii" /> <meta name="description" content="Ghost Hunters Potal. Parnormal research equipment store." /> <meta name="author" content="Andrew McCarrick" /> <meta name="robots" content="index, follow" /> <style type="text/css"> body {background-color: #000000; color: #FFFFFF; font-family: Verdana; margin-top: 10px; margin-right:auto;margin-left:auto;max-width:1000px;}</style> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="shortcut icon" href="./favicon.png" /> <script type="text/javascript"> <!-- function load(){ var url = window.location.href; var parts = url.split("#"); var type = parts[1]; if(type==undefined){ type="overview"; } sndReq(type); changeClr('nav'+type); } function requestObj() { var reqObj; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ reqObj = new ActiveXObject("Microsoft.XMLHTTP"); }else{ reqObj = new XMLHttpRequest(); } return reqObj; } var http = requestObj(); function sndReq(action) { var product_id ="2"; http.open('get', 'data.php?get='+action+'&product='+product_id, true); http.onreadystatechange = handleResponse; http.send(null); } function handleResponse() { if(http.readyState == 4){ var response = http.responseText; document.getElementById("ajaxout").innerHTML = response; } } function changeClr(sel) { if(sel == "navoverview"){ document.getElementById('navoverview').style.backgroundColor = '#AA00AA'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navspecifications"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#AA00AA'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navreviews"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#AA00AA'; } } //--> </script></head> <body onload="load();"> <div class="header"> <a href="./index.php"> <div class="logo"><img src="./logo.png" alt="Ghost Hunter's Portal" /></div> <div class="tag"><img src="./tag.png" alt="Ghost Hunter's Portal" /></div> </a> <div class="header_right"> <div class="ad"> </div> <div class="header_links"> <a href="./index.php">Home</a> | View Cart | <a href="./index.php?returns">Returns</a> | <a href="./index.php?aboutus">About Us</a> | <a href="./index.php?contactus">Contact Us</a> </div> </div> </div> <div class="content_wrapper"> <div class="links"> <div class="categories">Categories</div> <div><a href="store.php?cat=test">Test</a></div> <div><a href="store.php?cat=test2">Test2</a></div> <div><a href="store.php?cat=test10">Test10</a></div> <div><a href="store.php?cat=test20">Test20</a></div> <div><a href="store.php?cat=test50">Test50</a></div> <div class="sig"><img src="./sig.png" /></div> </div> <div class="data_wrapper"> <div class="search_crumbs"> <div class="crumbs"> <a href="./index.php">Home</a> <span class="eleven">></span> <a href="./store.php?cat=test">Test</a> <span class="eleven">></span> <a href="./store.php?product=2">Test123</a></div> <div class="search"> <form action="./index.php?search" method="post"> <label>Search</label> <input type="text" name="search" size="30" /> <input type="submit" value="Go" name="Go" /> </form> </div> </div> <div class="content"> <div class="product_wrapper"> <div class="product_title">Test123</div> <div class="product_image"> <div><img src="test123.png" alt="Test123" /></div> </div> <div class="product_details"> <div class="product_price">Price: $1000</div> <div class="product_code">GHP#: test</div> <div class="rating_image"><img src="4.5.png" alt="4.5" /> <span class="twelve">(2 Reviews)</span></div><div><div class="product_highlights_text">Product Highlights</div><div class="product_highlights_item"><ul><li>test</li> <li>test2</li> <li>test3</li></ul></div> </div> </div> <div class="add_cart_wrapper"> <div class="add_cart">ADD CART BUTTON</div> </div> </div> <script type="text/javascript"><!-- document.write("\n<div class=\"product_tab_wrapper\">\n<div class=\"product_tab\" id=\"navoverview\" style=\"background-color: #AA00AA;\">\n<a href=\"./store.php?product=2#overview\" onclick=\"sndReq(\'overview\'); changeClr(\'navoverview\');\">Overview</a>\n</div>\n<div class=\"product_tab\" id=\"navspecifications\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#specifications\" onclick=\"sndReq(\'specifications\'); changeClr(\'navspecifications\');\">Specifications</a>\n</div>\n<div class=\"product_tab\" id=\"navreviews\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#reviews\" onclick=\"sndReq(\'reviews\'); changeClr(\'navreviews\');\">Customer Reviews</a>\n</div>\n</div>\n<div class=\"product_information\" id=\"ajaxout\">\ntest\n</div>\n\n"); //--></script> <noscript> <div class="product_tab_wrapper"> <div class="product_tab" id="navoverview" style="background-color: #AA00AA;"> <a href="./store.php?product=2">Overview</a> </div> <div class="product_tab" id="navspecifications" style="background-color: #660066"> <a href="./store.php?product=2&get=specifications">Specifications</a> </div> <div class="product_tab" id="navreviews" style="background-color: #660066;"> <a href="./store.php?product=2&get=reviews">Customer Reviews</a> </div> </div> <div class="product_information"><div class="product_information_text">test</div> </div> </noscript> </div> <br /> </div> </div> <div class="footer"> © 2011 Ghost Hunter's Portal (Designed by: Andrew McCarrick) </div> </body> </html>
  17. I could of sworn I tried changing that 80 different times and when I did it changed absolutely nothing on the page... Now it does. Thanks.
  18. The tabs on the following page are not reacting to margin-top setting. I'm trying to push them down about 5-10 pixels to separate them a little more from the picture above them. http://ghosthuntersportal.com/store.php?product=2 store <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <base href="http://ghosthuntersportal.com/" /> <title>Ghost Hunter's Portal - Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="verify-v1" content="" /> <meta name="keywords" content="ghost, hunters, hunter, ghosts, spirit, spirits, paranormal, investigation, investigator, investigators, k2, emf, meter, kii" /> <meta name="description" content="Ghost Hunters Potal. Parnormal research equipment store." /> <meta name="author" content="Andrew McCarrick" /> <meta name="robots" content="index, follow" /> <style type="text/css"> body {background-color: #000000; color: #FFFFFF; font-family: Verdana; margin-top: 10px; margin-right:auto;margin-left:auto;max-width:1000px;}</style> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="shortcut icon" href="./favicon.png" /> <script type="text/javascript"> <!-- function load(){ var url = window.location.href; var parts = url.split("#"); var type = parts[1]; if(type==undefined){ type="overview"; } sndReq(type); changeClr('nav'+type); } function requestObj() { var reqObj; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ reqObj = new ActiveXObject("Microsoft.XMLHTTP"); }else{ reqObj = new XMLHttpRequest(); } return reqObj; } var http = requestObj(); function sndReq(action) { var product_id ="2"; http.open('get', 'data.php?get='+action+'&product='+product_id, true); http.onreadystatechange = handleResponse; http.send(null); } function handleResponse() { if(http.readyState == 4){ var response = http.responseText; document.getElementById("ajaxout").innerHTML = response; } } function changeClr(sel) { if(sel == "navoverview"){ document.getElementById('navoverview').style.backgroundColor = '#AA00AA'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navspecifications"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#AA00AA'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navreviews"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#AA00AA'; } } //--> </script></head> <body onload="load();"> <div class="header"> <a href="./index.php"> <div class="logo"><img src="./logo.png" alt="Ghost Hunter's Portal" /></div> <div class="tag"><img src="./tag.png" alt="Ghost Hunter's Portal" /></div> </a> <div class="header_right"> <div class="ad"> </div> <div class="header_links"> <a href="./index.php">Home</a> | View Cart | <a href="./index.php?returns">Returns</a> | <a href="./index.php?aboutus">About Us</a> | <a href="./index.php?contactus">Contact Us</a> </div> </div> </div> <div class="content_wrapper"> <div class="links"> <div class="categories">Categories</div> <div><a href="store.php?cat=test">Test</a></div> <div><a href="store.php?cat=test2">Test2</a></div> <div><a href="store.php?cat=test10">Test10</a></div> <div><a href="store.php?cat=test20">Test20</a></div> <div><a href="store.php?cat=test50">Test50</a></div> <div class="sig"><img src="./sig.png" /></div> </div> <div class="data_wrapper"> <div class="search_crumbs"> <div class="crumbs"> <a href="./index.php">Home</a> <span class="eleven">></span> <a href="./store.php?cat=test">Test</a> <span class="eleven">></span> <a href="./store.php?product=2">Test123</a></div> <div class="search"> <form action="./index.php?search" method="post"> <label>Search</label> <input type="text" name="search" size="30" /> <input type="submit" value="Go" name="Go" /> </form> </div> </div> <div class="content"> <div class="product_wrapper"> <div>Test123</div> <div class="product_image"> <div><img src="test123.png" alt="Test123" /></div> </div> <div class="product_details"> <div class="product_price">Price: $1000</div> <div class="product_code">GHP#: test</div> <div class="rating_image"><img src="4.5.png" alt="4.5" /> <span class="twelve">(2 Reviews)</span></div><div><div class="product_highlights_text">Product Highlights</div><div class="product_highlights_item"><ul><li>test</li> <li>test2</li> <li>test3</li></ul></div> </div> </div> <div class="add_cart">ADD CART BUTTON</div> </div> <script type="text/javascript"><!-- document.write("\n<div class=\"product_tab_wrapper\">\n<div class=\"product_tab\" id=\"navoverview\" style=\"background-color: #AA00AA;\">\n<a href=\"./store.php?product=2#overview\" onclick=\"sndReq(\'overview\'); changeClr(\'navoverview\');\">Overview</a>\n</div>\n<div class=\"product_tab\" id=\"navspecifications\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#specifications\" onclick=\"sndReq(\'specifications\'); changeClr(\'navspecifications\');\">Specifications</a>\n</div>\n<div class=\"product_tab\" id=\"navreviews\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#reviews\" onclick=\"sndReq(\'reviews\'); changeClr(\'navreviews\');\">Customer Reviews</a>\n</div>\n</div>\n<div class=\"product_information\" id=\"ajaxout\">\nPlease select a section from the tabs above.\n</div>\n\n"); //--></script> <noscript> <div class="product_tab_wrapper"> <div class="product_tab" id="navoverview" style="background-color: #AA00AA;"> <a href="./store.php?product=2">Overview</a> </div> <div class="product_tab" id="navspecifications" style="background-color: #660066"> <a href="./store.php?product=2&get=specifications">Specifications</a> </div> <div class="product_tab" id="navreviews" style="background-color: #660066;"> <a href="./store.php?product=2&get=reviews">Customer Reviews</a> </div> </div> <div class="product_information"><div>test</div> </div> </noscript> </div> <br /> </div> </div> <div class="footer"> © 2011 Ghost Hunter's Portal (Designed by: Andrew McCarrick) </div> </body> </html> style.css a:link { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:visited { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:active { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:hover { color: #FF44FF; font-weight: bold; text-decoration: none; } .admin_cp a:link { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:visited { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:active { color: #0000FF; text-decoration: underline; font-weight: none; } .admin_cp a:hover { color: #0000FF; text-decoration: underline; font-weight: none; } .header{ width: 999px; height: 75px; border: 2px; border-color: #660066; border-style: none; border-bottom-style: solid; } .logo{ float: left; margin-top: -12px; margin-left: -3px; height: 76px; width: 460px; } .tag{ float: left; margin-top: 40px; margin-left: -453px; height: 35px; width: 460px; } .header_right{ width: 530px; height: 74px; float: left; } .header_links{ width: 350px; height: 16px; text-align: center; font-size: 12px; margin-left: 180px; } .header_links a:link{ color: #FFFFFF; text-decoration: none; } .header_links a:hover{ color: #FFFFFF; text-decoration: underline; font-weight: bold; } .ad{ margin-left: 140px; width: 390px; height: 55px; text-align: center; } .adposition{ } .adspacer{ } .adspacer2{ } .content_wrapper{ width: 995px; height: 100%; min-height: 450px; border: 2px; border-color: #660066; border-style: solid; border-top-style: none; overflow: auto; } .categories{ margin-top: -10px; margin-bottom: 3px; margin-left: -5px; font-weight: bold; font-size: 16px; text-align: center; } .links{ font-size: 14px; margin-top: 15px; margin-left: 10px; float: left; width: 165px; } .links a:link{ font-weight: bold; } .data_wrapper{ float: right; width: 815px; height: 100%; min-height: 450px; border: 2px; border-color: #660066; border-style: none; border-left-style: solid; } .search_crumbs{ height: 30px; width: 815px; margin-top: 7px; } .crumbs{ float: left; width: 400px; height: 25px; font-weight: bold; font-size: 12px; margin-left: 15px; margin-top: 5px; } .search{ float: right; width: 325px; height: 25px; text-align: right; font-weight: bold; font-size: 14px; margin-right: 15px; } .content{ height: 100%; min-height: 450px; width: 790px; margin-left: 15px; } .footer{ float: left; width: 995px; margin-top: 5px; text-align: center; font-size: 11px; clear: both; border: 7px; border-color: #000000; border-bottom-style: solid; } .content_text{ margin-top: 5px; margin-left: 55px; font-size: 15px; width: 671px; } .content_header{ font-size: 24px; text-align: center; margin-bottom: 5px; } .popular_products{ height: 145px; } .product{ float: left; text-align: center; width: 160px; margin-top: 10px; margin-left: 10px; font-size: 14px; } .product a:link{ color: #FF44FF; font-weight: bold; text-decoration: underline; } .product a:visited { color: #FF44FF; font-weight: bold; text-decoration: underline; } .product a:hover{ color: #FFFFFF; text-decoration: underline; font-weight: bold; } .product_image{ float: left; margin-top: 5px; } .product_details{ float: left; margin-left: 25px; } .product_price{ font-size: 18px; color: #CC00CC; } .product_wrapper{ margin-left: 15px; width: 700px; } .product_links_headers{ float: left; width: 785px; margin-top: 10px; margin-left: 15px; } .product_highlights_text{ font-weight: bold; font-size: 14px; margin-top: 5px; } .product_highlights_item{ font-size: 14px; margin-top: -13px; margin-left: -25px; } .product_code{ font-size: 12px; } .rating_image{ margin-top: 3px; } .review_container{ margin-top: 10px; } .add_cart{ float: left; width: 200px; margin-left: 25px; text-align: center; } .contactus_links{ font-weight: bold; } .contactus_links a:link { color: #FF44FF; text-decoration: none; } .contactus_links a:visited { color: #FF44FF; text-decoration: none; } .contactus_links a:active { color: #FF44FF; text-decoration: none; } .contactus_links a:hover { color: #FFFFFF; text-decoration: none; } .product_tab{ width: 200px; text-align: center; float: left; border: 1px; border-color: #CC00CC; border-style: solid; border-collapse: collapse; } .product_tab_spacer{ width: 700px; } .product_tab_wrapper{ width: 700px; clear: both; margin-top: 300px; margin-left: 15px; } .product_information{ width: 750px; border: 1px; border-color: #CC00CC; border-style: solid; border-collapse: collapse; margin-left: 15px; clear: both; } .address{ color: #008800; margin-left: 40px; } .seventypercent{ width: 70%; } img{ border: 0px; } .center{ text-align: center; } .underline{ text-decoration: underline; } .bold{ font-weight: bold; } .italics{ font-style: italic } .eleven{ font-size: 11px; } .twelve{ font-size: 12px; } .fourteen{ font-size: 14px; } .sixteen{ font-size: 16px; } .gray{ color: #6F6F6F; } .eighteen{ font-size: 18px; } .twentyeight{ font-size: 28px; } .twentysix{ font-size: 26px; } .thirtytwo{ font-size: 32px; } .skyblue{ color: #3399FF; } .red{ color: #FF0000; } .sig{ margin-left: 50px; margin-top: 325px; } .green{ color: #008800; } .blue{ color: #000000; } .fortyfive{ width: 45%; } .sixty{ width: 60%; } .twenty{ width: 20%; } .clear{ clear: both; }
  19. Alright, I just downloaded Firebug and I'm getting "sndReq not defined". <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <base href="http://ghosthuntersportal.com/" /> <title>Ghost Hunter's Portal - Test</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="verify-v1" content="" /> <meta name="keywords" content="ghost, hunters, hunter, ghosts, spirit, spirits, paranormal, investigation, investigator, investigators, k2, emf, meter, kii" /> <meta name="description" content="Ghost Hunters Potal. Parnormal research equipment store." /> <meta name="author" content="Andrew McCarrick" /> <meta name="robots" content="index, follow" /> <style type="text/css"> body {background-color: #000000; color: #FFFFFF; font-family: Verdana; margin-top: 10px; margin-right:auto;margin-left:auto;max-width:1000px;}</style> <link rel="stylesheet" type="text/css" href="style.css" /> <link rel="shortcut icon" href="./favicon.png" /> <script type=\"text/javascript\"> <!-- function load(){ var url = window.location.href; var parts = url.split("#"); var type = parts[1]; if(type==undefined){ type="overview"; } sndReq(type); changeClr('nav'+type); } function requestObj() { var reqObj; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ reqObj = new ActiveXObject("Microsoft.XMLHTTP"); }else{ reqObj = new XMLHttpRequest(); } return reqObj; } var http = requestObj(); function sndReq(action) { var product_id ="2"; http.open('get', 'store.php?product='+product_id+'&get='+action, true); http.onreadystatechange = handleResponse; http.send(null); } function handleResponse() { if(http.readyState == 4){ var response = http.responseText; document.getElementById("ajaxout").innerHTML = response; } } function changeClr(sel) { if(sel == "navoverview"){ document.getElementById('navoverview').style.backgroundColor = '#AA00AA'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navspecifications"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#AA00AA'; document.getElementById('navreviews').style.backgroundColor = '#660066'; } else if(sel == "navreviews"){ document.getElementById('navoverview').style.backgroundColor = '#660066'; document.getElementById('navspecifications').style.backgroundColor = '#660066'; document.getElementById('navreviews').style.backgroundColor = '#AA00AA'; } } //--> </script></head> <body load();> <div class="header"> <a href="./index.php"> <div class="logo"><img src="./logo.png" alt="Ghost Hunter's Portal" /></div> <div class="tag"><img src="./tag.png" alt="Ghost Hunter's Portal" /></div> </a> <div class="header_right"> <div class="ad"> </div> <div class="header_links"> <a href="./index.php">Home</a> | View Cart | <a href="./index.php?returns">Returns</a> | <a href="./index.php?aboutus">About Us</a> | <a href="./index.php?contactus">Contact Us</a> </div> </div> </div> <div class="content_wrapper"> <div class="links"> <div class="categories">Categories</div> <div><a href="store.php?cat=test">Test</a></div> <div><a href="store.php?cat=test2">Test2</a></div> <div><a href="store.php?cat=test10">Test10</a></div> <div><a href="store.php?cat=test20">Test20</a></div> <div><a href="store.php?cat=test50">Test50</a></div> <div class="sig"><img src="./sig.png" /></div> </div> <div class="data_wrapper"> <div class="search_crumbs"> <div class="crumbs"> <a href="./index.php">Home</a> <span class="eleven">></span> <a href="./store.php?cat=test">Test</a> <span class="eleven">></span> <a href="./store.php?product=2">Test123</a></div> <div class="search"> <form action="./index.php?search" method="post"> <label>Search</label> <input type="text" name="search" size="30" /> <input type="submit" value="Go" name="Go" /> </form> </div> </div> <div class="content"> <div class="product_wrapper"> <div>Test123</div> <div class="product_image"> <div><img src="test123.png" alt="Test123" /></div> </div> <div class="product_details"> <div class="product_price">Price: $1000</div> <div class="product_code">GHP#: test</div> <div class="rating_image"><img src="4.5.png" alt="4.5" /> <span class="twelve">(2 Reviews)</span></div><div><div class="product_highlights_text">Product Highlights</div><div class="product_highlights_item"><ul><li>test</li> <li>test2</li> <li>test3</li></ul></div> </div> </div> <div class="add_cart">ADD CART BUTTON</div> </div> <script type="text/javascript"><!-- document.write("\n<div class=\"product_tab_wrapper\">\n<div class=\"product_tab\" id=\"navoverview\" style=\"background-color: #AA00AA;\">\n<a href=\"./store.php?product=2#overview\" onclick=\"sndReq(\'overview\'); changeClr(\'navoverview\');\">Overview</a>\n</div>\n<div class=\"product_tab\" id=\"navspecifications\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#specifications\" onclick=\"sndReq(\'specifications\'); changeClr(\'navspecifications\');\">Specifications</a>\n</div>\n<div class=\"product_tab\" id=\"navreviews\" style=\"background-color: #660066;\">\n<a href=\"./store.php?product=2#reviews\" onclick=\"sndReq(\'reviews\'); changeClr(\'navreviews\');\">Customer Reviews</a>\n</div>\n</div>\n<div class=\"product_information\" id=\"ajaxout\">\nPlease select a section from the tabs above.\n</div>\n\n"); //--></script> <noscript> <div class="product_tab_wrapper"> <div class="product_tab" id="navoverview" style="background-color: #AA00AA;"> <a href="./store.php?product=2">Overview</a> </div> <div class="product_tab" id="navspecifications" style="background-color: #660066"> <a href="./store.php?product=2&get=specifications">Specifications</a> </div> <div class="product_tab" id="navreviews" style="background-color: #660066;"> <a href="./store.php?product=2&get=reviews">Customer Reviews</a> </div> </div> <div class="product_information"><div>test</div> </div> </noscript> </div> <br /> </div> </div> <div class="footer"> © 2011 Ghost Hunter's Portal (Designed by: Andrew McCarrick) </div> </body> </html>
  20. Well I just tried integrating the above into my site, and it doesn't work. At all. Ideas? http://ghosthuntersportal.com/store.php?product=2
  21. I'm looking to make a three links to update a table set-up below them. Just checking to make sure I did this right (I use AJAX and javascript infrequently at best): <script type="text/javascript"> function load(){ var url = window.location.href; var parts = url.split("#"); var type = parts[1]; if(type==undefined){ type="overview"; } sndReq(type); changeClr('nav'+type); var parts2 = url.split("="); var parts3 = parts2.split("&"); var product_id = parts3[0]; } </script> <script type="text/javascript"> function requestObj() { var reqObj; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ reqObj = new ActiveXObject("Microsoft.XMLHTTP"); }else{ reqObj = new XMLHttpRequest(); } return reqObj; } var http = requestObj(); function sndReq(action) { http.open('get', 'store.php?product='+product_id'&get='+action, true); http.onreadystatechange = handleResponse; http.send(null); } function handleResponse() { if(http.readyState == 4){ var response = http.responseText; document.getElementById("ajaxout").innerHTML = response; } } </script> <script type="text/javascript"> function changeClr(sel) { if(sel == "navoverview"){ document.getElementById('navoverview').style.backgroundColor = '#AA0000'; document.getElementById('navspecifications').style.backgroundColor = '#660000'; document.getElementById('navreviews').style.backgroundColor = '#660000'; } else if(sel == "navspecifications"){ document.getElementById('navoverview').style.backgroundColor = '#660000'; document.getElementById('navspecifications').style.backgroundColor = '#AA0000'; document.getElementById('navreviews').style.backgroundColor = '#660000'; } else if(sel == "navreviews"){ document.getElementById('navoverview').style.backgroundColor = '#660000'; document.getElementById('navspecifications').style.backgroundColor = '#660000'; document.getElementById('navreviews').style.backgroundColor = '#AA0000'; } } </script> <div class="border" id="navoverview" style="background-color: #AA0000;"> <a href="./store.php?product='.$product_id.'#overview" onclick="sndReq(\'overview\'); changeClr(\'navoverview\');">Ovewview</a> </div> <div class="border" id="navspecifications" style="background-color: #660000;"> <a href="./store.php?product'.$product_id.'#specifications" onclick="sndReq(\'specifications\'); changeClr(\'navspecifications\');">Specifications</a> </div> <div class="border" id="navreviews" style="background-color: #660000;"> <a href="./store.php?product='.$product_id.'#reviews" onclick="sndReq(\'reviews\'); changeClr(\'navreviews\');">Customer Reviews</a> </div> <noscript> <div class="border" id="navoverview" style="background-color: #AA0000;"> <a href="./store.php?product='.$product_id.'">Overview</a> </div> <div class="border" id="navspecifications" style="background-color: #660000;"> <a href="./store.php?product'.$product_id.'&get=specifications">Specifications</a> </div> <div class="border" id="navreviews" style="background-color: #660000;"> <a href="./store.php?product='.$product_id.'&get=reviews">Customer Reviews</a> </div> </noscript> <div class="center" id="ajaxout"> Please select a section from the tabs above. </div>
  22. Crap.... you're right. I switched to $_GET['get']=="reviews" now anyway. It's working now. Thanks.
  23. The below should be making it so that in order for "customer reviews" to be visible, you should need the "&review" in the url, but it's coming up regardless if it's in the URL or not. http://ghosthuntersportal.com/store.php?product=2 elseif(isset($_GET['product'])){ $product_id=$_GET['product']; $sql500="SELECT * FROM $tbl_name3 WHERE product_id='$product_id'"; $result500=mysql_query($sql500); $num_rows500=mysql_num_rows($result500); if($num_rows500==0){ $average_rating=0; } else{ while($row500=mysql_fetch_array($result500)){ extract($row500); $total = $total + $review_product_rating; $review.=' <div class="review_container"> <div>'.$review_product_rating.' '.$review_title.'</div> <div>By '.$review_name.' from '.$review_location.' on '.$review_date.'</div> <div>Pros: </div><div>'.$review_pros.'</div> <div>Cons: </div><div>'.$review_cons.'</div> <div>Describe Yourself: </div><div>'.$review_describe.'</div> <div>Best Use: </div><div>'.$review_best_use.'</div> <div>'.$review_text.'</div> </div> '; } $review_product_rating_total=$total; $average_rating=$review_product_rating_total/$num_rows500; } $sql50="SELECT * FROM $tbl_name WHERE product_id='$product_id'"; $result50=mysql_query($sql50); while($row50=mysql_fetch_array($result50)){ extract($row50); $section=ucwords($product_category); $product_name=ucwords($product_name); $crumbs='<a href="./index.php">Home</a> <span class="eleven">></span> <a href="./store.php?cat='.$product_category.'">'.$section.'</a> <span class="eleven">></span> <a href="./store.php?product='.$product_id.'">'.$product_name.'</a>'; $section=" - ".$section; $product_highlights=str_replace("[","<li>", $product_highlights); $product_highlights=str_replace("]","</li>", $product_highlights); $content.=' <div class="product_wrapper"> <div>'.$product_name.'</div> <div class="product_image"> <div><img src="'.$product_image.'" alt="'.$product_name.'" /></div> </div> <div class="product_details"> <div class="product_price">Price: $'.$product_price.'</div> <div class="product_code">GHP#: '.$product_code.'</div> <div class="rating_image">'; if($num_rows500==0){ $content.='No Rating'; } else{ $content.='<img src="'.$average_rating.'.png" alt="'.$average_rating.'" />'; } $content.=' <span class="twelve">('.$num_rows500.' Reviews)</span></div><div>'; if(isset($product_highlights)){ $content.='<div class="product_highlights_text">Product Highlights</div><div class="product_highlights_item"><ul>'.$product_highlights.'</ul></div>'; } else{ } $content.='</div> </div> </div> '; } $content.='<div class="product_links_headers">Overview | Specifications | Customer Reviews</div>'; if(isset($review)){ $content.='<div style="margin-top: 400px;">'.$review.'</div>'; } elseif(isset($specifications)){ $content.='<div style="margin-top: 400px;">'.$product_specifications.'</div>'; } else{ } }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.