Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About barney0o0

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  1. Sorry, i dont understand..i think you need to spell it out more literally to me Start repeat C1 <li> <ul> Start repeat C2 <li></li> End repeat C2 </ul> <li> End repeat C1 would you have a mo to tweak what i sent before...my head hurts
  2. Oops spoke too soon I need a tweak on how the record its echo'd The structure of the menu within the repeat would be: <li class="has-dropdown"> <a href="#">'.$c1.'</a> <ul> <li><a href="#">'.$c2.'</a></li> // repeat all C2 records <li><a href="#">'.$c2.'</a></li> // etc etc </ul> </li> // closed li 'has-dropdown', repeat all loop depending in C1 no. of records However the closing ul li is repeating with the no. of records from C2, rather than that of C1...what i have so far is: <?php $sql ="
  3. Thanks Barand..it works like a dream (i didn't think it would )...nice approach that i'd definitely use in the future Many thanks again
  4. Hi Barand, i don't believe a join would work for what i need...unless im misinterpreting your suggestion The output structure would be something like this: $m['c1_tit_it']; (with cat1id of 1) $s['c2_tit_it']; (with sublistid of 1) $s['c2_tit_it']; (with sublistid of 1) $s['c2_tit_it']; (with sublistid of 1) $s['c2_tit_it']; (with sublistid of 1) $m['c1_tit_it']; (with cat1id of 2) $s['c2_tit_it']; (with sublistid of 2) $s['c2_tit_it']; (with sublistid of 2) $m['c1_tit_it']; (with cat1id of 3) $s['c2_tit_it']; (with sublistid of 3) $s['c2_tit_it']; (with sublisti
  5. Hello...another post in as many days I wish to show all records in a query. 'Within' this loop i need to echo out data from another query that is dependent on the the first query..........so <?php $mm = $pdo->query("SELECT n_cat1.cat1id, n_cat1.c1_tit_it FROM n_cat1 ORDER BY c1_tit_it ASC"); $mm->execute(); while ( $m = $mm->fetchl(PDO::FETCH_ASSOC)) { $sublistid = $m['cat1id']; ?> <html> <title><?php echo $m['c1_tit_it']; ?></title> <subtitle><?php echo $s['c2_tit_it']; ?></subtitle> </html> <?php } ?
  6. After a quick look, it doesnt incorporate to click/drag to select part of an image you want to resize.....which the one i use does
  7. OK, got it sorted ...thanks requinix...i was working at it too thinking i couldn't reuse some of the strings due to conflicts...heres the working script with both large/small images and watermark on the large image <?php $valid_exts = array('jpeg', 'jpg', 'png', 'gif'); $max_file_size = 20343 * 30124; #200kb $nw = 1600; # image with # height $nh = 627; $nw2 = 800; # image with # height $nh2 = 313; ?> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { if ( isset($_FILES['image']) ) { if (! $_FILES['image']['error'] && $_FILES['image']['size'] < $max_file_size) {
  8. Would i simply go through the first bit of processing > destroy the image, then do the same again but with different size variables?...if that is the case, do i need to change the strings $dstImg to say $distImg2 to save conflict or am i misread the flow of the code..thanks for your help
  9. HI Chaps, i need someone to hold my hand with this...i have a working script to upload a image (below)...what id like it to do is also create a small image of the cropped image...ive been messing around by simply duplicating the original values, but i just cant get it to work...im not very knowledgeable On the initial page (to browse for the file), i have hidden inputs <input type="hidden" id="x" name="x" /> <input type="hidden" id="y" name="y" /> <input type="hidden" id="w" name="w" /> <input type="hidden" id="h" name="h" /> The its passed onto another
  10. Ok, they are the same. cart.php has a link to delete rows from the session values with the url cart.php?xyz with the necessary values ( as in my initial post) to cross check and fire the delete.When I test using cart.php ( as apposed to /cart) it works fine. I don't know what is the correct method is to send to /cart ( which is directed to cart.php (self)) and fire the code to delete the session row ( in the original post)..
  11. Those values are created with the link. The script cross checks the values against the session values. The session script, if OK, then removes the row. As mentioned, the .php file works fine...I don't understand how I can reload the page with the del=1 condition with a seo friendly URL as apposed to the functioning .php file
  12. The only url parameter is the $lang, all the other data is pulled from the session.
  13. The full url is website.com/en/cart The content of the cart.php page is pulled down from both the session 'user' and 'cart' Its a little B2B site, which content is user protected, i know its not ideal, but this should've been a quick fixed thats melting my brain. The above script works fine when using the .php file In the htaccess rewrite file theres a simple 'RewriteRule ^([a-zA-Z_]+)/cart$ cart.php?lang=$1 [L,NC]
  14. HI, its a been a long afternoon....ive inherited partial site to update. Shopping cart works fine, however as ive updated the structure to SEO friendly urls one part isnt working I have a delete button, and script to update the session: <a href="cart.php?rid=x&del=1&pos=y" >delete </a> if($_GET['del']==1 && isset($_GET['rid']) && $_GET['rid']!='' && $_GET['rid']!=0) { $r=$_GET['rid']; $pos=$_GET['pos']; $_SESSION['qty']=$_SESSION['qty']-$_SESSION['cart'][$pos]['qty']; unset($_SESSION['cart'][$pos]); } when using the url
  • 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.