Jump to content

emma57573

Members
  • Posts

    106
  • Joined

  • Last visited

    Never

Everything posted by emma57573

  1. Sorry guys I managed to fix this one myself, It ended up being so simple!! as always seems to be the way!
  2. Sorry its proberly just me being a learning novice or completly thick! but I cant work out why this isnt working: The problem: Click on 'bath & Beauty' under the categories on the right hand side (ie: accessories/art/bags etc) http://www.misi.me.uk/store_info.php?id=54 It will take you to this page: http://www.misi.me.uk/view_items.php?id=54&cid=4 Right theres my problem! The menus gone! If you go to the url bar at the top and take out the category number '&cid=4' so you basically go to: http://www.misi.me.uk/view_items.php?id=54 it then throws up an error which gives my a clue but I still cant work out the problem! The menu on 'view_items.php' is the same script at 'store_info.php' so Im guessing that my problem is something the store_info.php is sending (if that makes any sence?) The script for the catergory menu is as follows: <? $cats_query=mysql_query("select * from freetplclassified_categories where pid=$cid order by cat_name"); $cnt=1; while($cats=mysql_fetch_array($cats_query)) { $rst_query=mysql_query("Select * from freetplclassified_categories where pid=".$cats["id"] ); $clist=$cats["id"]; while ( $rst=mysql_fetch_array($rst_query) ) { $clist.="," . $rst["id"]; $thislist="-1," . $rst["id"]; while ( $rst=mysql_fetch_array($rst_query) ) { $clist.="," . $rst["id"]; $thislist.="," . $rst["id"]; //echo $rst["freetplcat_id"]; } $rst_query=mysql_query("Select * from freetplclassified_categories where pid in (" . $thislist . ")" ); } $freetplcat_str= " and cid IN (" .$clist . ")" ; $freetplq_job_cat="Select * from freetplclassified_products where approved='yes' and uid=$id and uid not in ($suspended_list) and UNIX_TIMESTAMP(DATE_ADD(date_submitted,INTERVAL auction_period DAY)) > UNIX_TIMESTAMP(NOW()) and status='open' $freetplcat_str"; $freetpltotal=mysql_num_rows(mysql_query($freetplq_job_cat)); //die(); if($freetpltotal >= 1) { ?> <tr><? echo $id;?> <td align="left"><font class='normal'> <a href="view_items.php?id=<? echo $id;?>&cid=<? echo $cats["id"];?>"> <? echo $cats["cat_name"]; ?></a></font> <font class="smalltext">(<? echo $freetpltotal; ?>)</font></td> <? } ?><td width="2"></td></tr> <? if($cnt%1==0) { ?> <? } $cnt++; } ?> I know its a $freetpltotal problem but im not sure what the problem is. Thank you
  3. Thank you very much, you have been most helpful! I will no doubt be on here again for assistance, not sure I will be of much help to anyone else though :-\
  4. If it helps at all heres the link to the page: http://www.misi.me.uk/product_desc.php?id=136
  5. Hi, im new to this forum and quite novice Basically I have 5 images one is a 350 x 350px main image and the rest are thumnails they are all called from a mysql table I have a script that swaps the thumbnail images with the 350px image and its working great but there is one problem that I cant get my head around. Although it swaps the images the link on the main image stays the same! The 350 x 350px is linked so that when you click on it, it shows the full size image in a new window. The trouble Im having is that the link always brings up the first image in the array no matter what image is showing. Can anyone shed some light, It seems like a really simple fix but I can figure it out. JavaScript Function for swaping images - works great <script language="javascript" > function imageSwap(imgElem, newSrc) { document.getElementById(imgElem).src = newSrc; } PHP Function and images. $freetplq_img="select * from freetplclassified_images where pid=".$rst["id"]; // die($freetplq_img); $freetplrs_img=mysql_query($freetplq_img); if(mysql_num_rows($freetplrs_img)>0) { $freetplcnt=0; $freetplimg_per_row=5; while($freetplrow_img=mysql_fetch_array($freetplrs_img)) { if($freetplcnt%$freetplimg_per_row == 0) { ?> <td height="100%"> <table width="100%" height="100%" border="0" cellpadding="5" cellspacing="5"> <tr> <td width="51%" valign="top"><table border="0" cellspacing="5" cellpadding="5" class="onepxtable"> <tr> <td align="left"> <a href="uploadedimages/<?php echo $freetplrow_img["url"]; ?>" onclick="window.open(this.href); return false;"> <img name="onclick" id="swap_id" src="<?php echo $img_path.$freetplrow_img["url"]; ?>" border="0" width="350" height="350"></a></td> </tr> </table> </td> <td height="100%" align="left" valign="top"> <table width="100%" height="100%" border="0" cellpadding="5" cellspacing="0"> <?php } //end if $freetplcnt++; ?> <tr> <td align="left"> <a href="uploadedimages/<?php echo $freetplrow_img["url"]; ?>" rel="swap_id" onclick="imageSwap(this.rel, this.href); return false;"> <img src="<?php echo $img_path.$freetplrow_img["url"]; ?>" border="0" width="75" height="75" ></a></td> </tr> <?php if($freetplcnt%$freetplimg_per_row == 0) { ?> </table>
×
×
  • 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.