Jump to content

imimin

Members
  • Posts

    119
  • Joined

  • Last visited

    Never

Everything posted by imimin

  1. But is fixed by removing the "item_" portion of the links and just inserting one line of "$adult_size_chart" like so: <td> $adult_size_chart<br /> </td> </tr> <tr> <td> <strong>Garmet Size:</strong> <select id="custom40" name="custom40" size='5'> <option value="Size: Small (S)">Small (S)</option> <option value="Size: Medium (M)">Medium (M)</option> <option value="Size: Large (L)">Large (L)</option> <option value="Size: Extra Large (L)">Extra Large (L)</option> <option value="Size: Toddler (T)">Toddler (T)</option> </select><br /> <a href="javascript:newwindow2();" >Garment Measuring Tips</a> </td> <td> $child_size_chart<br /> </td> </tr>
  2. Just noticed on poj_order_form.php I am getting the following errors: Notice: Undefined variable: item_adult_size_chart in /homepages/27/d120150310/htdocs/poj/poj_order_form.php on line 273 Notice: Undefined variable: item_child_size_chart in /homepages/27/d120150310/htdocs/poj/poj_order_form.php on line 291 Patterns of Joy Order Form
  3. Yes it did! Thank you. I did have to make a slight change as shown below: <td> $item_adult_size_chart<br /> $adult_size_chart </td> </tr> <tr> <td> <strong>Garmet Size:</strong> <select id="custom40" name="custom40" size='5'> <option value="Size: Small (S)">Small (S)</option> <option value="Size: Medium (M)">Medium (M)</option> <option value="Size: Large (L)">Large (L)</option> <option value="Size: Extra Large (L)">Extra Large (L)</option> <option value="Size: Toddler (T)">Toddler (T)</option> </select><br /> <a href="javascript:newwindow2();" >Garment Measuring Tips</a> </td> <td> $item_child_size_chart<br /> $child_size_chart<br /> </td> </tr> Do you have any thoughts on the other block of code?
  4. OK, this is what I got: <B>Garment Style: </B>$item_selected_style <BR>" ?> <a href="http://www.patternsofjoy.com/order_more.php" TITLE="Click here to change Garement Style">***Change Garment Style***</a> </TD> </TR> <TR> <TD> <B>Size Range:</B><BR> <INPUT TYPE="RADIO" NAME=custom30 VALUE="Size Range: Adult +$2.00"> Adult <INPUT TYPE="RADIO" NAME=custom30 VALUE="Size Range: Child"> Child<BR> </TD> <?php /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); // Ensure id was set if(!isset($_GET['id'])){ die("Id isn't set"); } // Clean the id $id = mysql_real_escape_string($_GET['id']); // Query Database $get_items = "SELECT * FROM poj_products WHERE `id` = '$id'"; $get_items = mysql_query($get_items); if($get_items){ $item_row = mysql_fetch_assoc($get_items); extract($item_row); echo <<<HTML <td> $adult_size_chart<br /> $child_size_chart </td> </tr> <tr> <td> <strong>Garmet Size:</strong> <select id="custom40" name="custom40" size='5'> <option value="Size: Small (S)">Small (S)</option> <option value="Size: Medium (M)">Medium (M)</option> <option value="Size: Large (L)">Large (L)</option> <option value="Size: Extra Large (L)">Extra Large (L)</option> <option value="Size: Toddler (T)">Toddler (T)</option> </select><br /> <a href="javascript:newwindow2();" >Garment Measuring Tips</a> </td> <td> $item_child_size_chart<br /> $child_size_chart<br /> </td> </tr> HTML; }else{ die("Unable to connect to database.".mysql_error()); } ?> <TR> <TD> Quantity: <INPUT TYPE=TEXT NAME=quantity VALUE="1" SIZE=2 MAXLENGTH=2> <BR><BR> <INPUT TYPE=SUBMIT NAME="add" VALUE="Order Now"> </FORM> </TD> </TR> </TABLE> </TH> </TR> </TABLE> </TD> </TD> <!--<TD VALIGN="top"> <?php include("includes/login_box.inc"); ?> </TD>--> </TR> </TABLE> </CENTER> <TABLE cellpadding="30"> <TR> <TD> <?php include("includes/bottom_info.php"); ?> </TD> </TR> </TABLE> <?php include ("includes/footer.inc"); ?> and I get the following error: Parse error: syntax error, unexpected $end in /homepages/27/d120150310/htdocs/poj/poj_order_form.php on line 341 Line 341 is the very end of the page!
  5. I was able to use your previous code and tried putting it in a single TD and it looks fine. If I use this most recent code, is it going to cause TABLE problems (I notice it has a start and end TABLE tag)??
  6. Would it be helpful if I were to send you the code to the whole page?
  7. Yes, that works fine. I need to be able to split up the 2 echo lines to 2 different TD's. I also have the other data 2 deal with I made mention of in the second portion of my last post. It is important that the variables stay in the same order as shown in the second large portion of code.
  8. OK, I set up the page that receives the id=# (poj_order_form.php) from the previous page (prod_detail.php): <?php /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); $get_items = "SELECT * FROM poj_products"; $get_items = mysql_query($get_items); if($get_items){ $item_row = mysql_fetch_assoc($get_items); extract($item_row); </TD> </TR> <TR> <TD> <B>Size Range:</B><BR> <INPUT TYPE="RADIO" NAME=custom30 VALUE="Size Range: Adult +$2.00"> Adult <INPUT TYPE="RADIO" NAME=custom30 VALUE="Size Range: Child"> Child<BR> </TD> <TD> $item_adult_size_chart = $_GET['item_adult_size_chart']; echo $item_row['adult_size_chart'].'<br/><br/>'; </TD> </TR> <TR> <TD> <B>Garment Size:</B> <SELECT NAME=custom40 SIZE=5> <OPTION VALUE='Size: Small (S)'>Small (S)</OPTION> <OPTION VALUE='Size: Medium (M)'>Medium (M)</OPTION> <OPTION VALUE='Size: Large (L)'>Large (L)</OPTION> <OPTION VALUE='Size: Extra Large (L)'>Extra Large (L)</OPTION> <OPTION VALUE='Size: Toddler (T)'>Toddler (T)</OPTION> </SELECT><BR> <A HREF="javascript:newwindow2()" >Garment Measuring Tips</A><BR> </TD> <TD> $item_child_size_chart = $_GET['item_child_size_chart']; echo $item_row['child_size_chart'].'<br/><br/>'; </TD> </TR> <TR> <TD> Quantity: <INPUT TYPE=TEXT NAME=quantity VALUE="1" SIZE=2 MAXLENGTH=2> <BR><BR> <INPUT TYPE=SUBMIT NAME="add" VALUE="Order Now"> </FORM> </TD> </TR> }else{ die("Unable to connect to database.".mysql_error()); } ?> </TABLE> When I access this page (by passing the id=#), I get the following error: Parse error: syntax error, unexpected '<' in /homepages/27/d120150310/htdocs/poj/poj_order_form.php on line 252 line 252 is just below the "extract($item_row);" line. Also, I am not sure how to set the script up to echo variables in another part of my page: <?php $item_selected_style = $_GET['item_selected_style']; $item_prod_name = $_GET['item_prod_name']; $item_retail = $_GET['item_retail']; $item_weight = $_GET['item_weight']; $item_img = $_GET['item_img']; echo " <INPUT TYPE=HIDDEN NAME=name VALUE='$item_prod_name'> <INPUT TYPE=HIDDEN NAME=price VALUE='$item_retail'> <INPUT TYPE=HIDDEN NAME=sh VALUE='$item_weight'> <INPUT TYPE=HIDDEN NAME=img VALUE='https://secure.impact-impressions.com/poj/includes/img_resize3.php?src=$sitelocation$item_img&width=100&height=100&qua=50'> <INPUT TYPE=HIDDEN NAME=img2 VALUE=''> <INPUT TYPE=HIDDEN NAME=return VALUE='http://www.patternsofjoy.com/order_more.php'> <INPUT TYPE='RADIO' NAME='custom20' VALUE='Style: $item_selected_style' CHECKED='CHECKED' style='display:none'> <B>Garment Style: </B>$item_selected_style <BR>" ?> here I need to echo the variables listed after "echo" which are still in the old format I was using. Thank you for your help!
  9. I am not sure what is going on? If I try your first code: echo <<<HTML <a href="{$sitelocation}{$url}?id=$id"> <img src="/images/order_now.jpg" style="border: none;"> </a> HTML; the link location that prints is: http://patternsofjoy.com/prod_detail.php?id=76 that does not look like variables to me ! If I use your second clip of code, I get the following error: Resource id #9 The second one also causes my echo statements on the next page to be printed twice with the error to be printed only after the first set of echos!
  10. All these variables correspond to fields in the same same row of the same table so I AM ASSUMING they are the same 'id'? Does that make sense?
  11. '<a href="'.$sitelocation.$item_row['url'].'?item_adult_size_chart=$id. "&" . item_id=$id . "&" . item_cat=$id . "&" . item_child_size_chart=$id . "&" . item_weight=$id . "&" . item_selected_style=$id . "&" . item_retail=$id . "&" . item_prod_name=$id . "&" . item_img=$id"><IMG SRC=\"/images/order_now.jpg\" BORDER=\"0\"></A>'; How do you properly combine all of the variables that you want to pass the values of? I have tried everything I could think of and nothing seems to work! My syntax is obviously off.
  12. If I use this code: <?php /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); $cat = mysql_real_escape_string($_GET['cat']); $get_items = "SELECT * FROM poj_products"; $get_items = mysql_query($get_items); if($get_items){ $item_row = mysql_fetch_assoc($get_items); extract($item_row); $item_desc = $_GET['item_desc']; echo $item_row['desc'].'<br/><br/>'; ?> I get the following error: Parse error: syntax error, unexpected $end in /homepages/27/d120150310/htdocs/poj/test2.php on line 70 Line 70 is the VERY BOTTOM OF THE PAGE!
  13. <?php /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); $get_items = "SELECT * FROM poj_products"; $get_items = mysql_query($get_items); $item_desc = $_GET['item_desc']; echo $item_row['desc'].'<br/><br/>'; ?> Getting error: Notice: Undefined variable: item_row in /homepages/27/d120150310/htdocs/poj/test2.php on line 46
  14. Comes from the defs.php file (in include) which specifies a portion of the site url.
  15. This code works fine: <?php if(!isset($_GET['cat'])){ die("Category isn't specified"); } /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); $cat = mysql_real_escape_string($_GET['cat']); $get_items = "SELECT * FROM poj_products WHERE cat='$cat'"; $get_items = mysql_query($get_items); if($get_items){ $item_row = mysql_fetch_assoc($get_items); extract($item_row); echo <<<HTML <a href="http://www.patternsofjoy.com/test2.php?item_desc=$id">View details/order</a> HTML; #echo '<a href="'.$sitelocation.$item_row['url'].'?item_desc='.$item_row['id'].'>view details/order</a>'; echo $_GET['cat']; }else{ die("Unable to connect to database.".mysql_error()); } ?> But when I pass the URL containing a pointer to the 'desc' in my DB to the next page (http://www.patternsofjoy.com/test2.php), nothing echoes? I am pretty sure I have the code correct on the next page which is: <?php $item_desc = $_GET['item_desc']; echo $item_row['desc'].'<br/><br/>'; ?> I am getting the3 error: Notice: Undefined variable: item_row in /homepages/27/d120150310/htdocs/poj/test2.php on line 46 Line 46 is: echo $item_row['desc'].'<br/><br/>'; Thank you!
  16. That did it! Why did we have to pass the url like that, how does it work? THANK YOU SO MUCH FOR ALL OF YOUR HELP!
  17. Before we do that, let me explain something... if I remove the echo line: echo '<a href="'.$sitelocation.$item_row['url'].'?item_desc='.$item_row['id'].'>view details/order</a>'; the "echo $_GET['cat'];" prints fine. But if I put the echo anchor tag back in, NOTHING PRINTS!
  18. Thanks for your help! I fixed the spelling and no more errors. However, it is still not echoing, not even the: echo $_GET['cat'];
  19. Yesw and it gave me the following error: Fatal error: Call to undefined function: myqsl_real_escape_string() in /homepages/27/d120150310/htdocs/poj/test1.php on line 69
  20. I am no longer getting the 'Category isn't specified' error. $sitelocation is coming from the def.php file and there are NO errors being reported.
  21. Thank you for all of your help :-X <?php if(!isset($_GET['cat'])){ die("Category isn't specified"); } /* Enable displaying of errors */ error_reporting(E_ALL); ini_set('display_errors', 'On'); $cat = (int) $_GET['cat']; $get_items = "SELECT * FROM poj_products WHERE cat='$cat'"; $get_items = mysql_query($get_items); if($get_items){ $item_row = mysql_fetch_assoc($get_items); echo '<a href="'.$sitelocation.$item_row['url'].'?item_desc='.$item_row['id'].'>view details/order</a>'; echo $_GET['cat']; }else{ die("Unable to connect to database.".mysql_error()); } ?>
  22. OK, I have that fixed but it is still not echoing???
  23. I put this in before the script, at the beginning just after the <?php tag.
  24. returns: 'Category isn't specified' What exactly does that mean?
×
×
  • 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.