Results 1 to 10 of 26

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    69
    Plugin Contributions
    0

    Default Re: Need Help Please

    Code:
    if(strrchr([$product_name][$i], '\\'))$image = substr(strrchr([$product_image][$i])), '\\', 1;else $image = substr(strrchr([$product_image][$i])), '/', 1;
    Code:
    if(strrchr($_POST['product_image'][$i], '\\'))$image = substr(strrchr(trim(stripslashes($_POST['product_image'][$i])), '\\'), 1);else $image = substr(strrchr(trim(stripslashes($_POST['product_image'][$i])), '/'), 1);

    the 1st line of code i tried came up with this error:
    Code:
    Parse error: syntax error, unexpected '[', expecting ')' in /home/tower/public_html/admin/quick_add_products.php on line 54
    the 2nd line which i had a go at comes up with another error:
    Code:
    Parse error: syntax error, unexpected T_STRING in /home/tower/public_html/admin/quick_add_products.php on line 57
    this is line 57
    Code:
    $products_id_query = $db->Execute("SELECT products_id from " . TABLE_PRODUCTS . " WHERE products_quantity=" . $product_quantity[$i] ." and products_model=" . $product_model[$i] ." and products_price=" . $product_price[$i] . " and products_weight=" . $product_weight[$i] . " and products_image=" . $image . " and products_status=" . $product_status[$i] . " and products_tax_class_id=" . $product_tax[$i] . " and manufacturers_id=" . $product_manufacturer[$i] . ";
    i also fixed the last instances that were only in line 54

  2. #2
    Join Date
    May 2007
    Posts
    69
    Plugin Contributions
    0

    Default Re: Need Help Please

    another strange thing is that if i comment out line 57 it still shows the same error in line 57

  3. #3
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Need Help Please

    Server or Browser caching?

  4. #4
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Need Help Please

    PHP Code:
    (strrchr([$product_name][$i
    All these instances should look like these:

    PHP Code:
    (strrchr($product_name[$i

  5. #5
    Join Date
    May 2007
    Posts
    69
    Plugin Contributions
    0

    Default Re: Need Help Please

    Code:
    if(strrchr($product_name[$i], '\\'))$image = substr(strrchr($product_image[$i])), '\\', 1;else $image = substr(strrchr($product_image[$i])), '/', 1;
    Parse error: syntax error, unexpected ',' in /home/tower/public_html/admin/quick_add_products.php on line 54

  6. #6
    Join Date
    Nov 2006
    Location
    Papworth, Cambridgeshire, UK
    Posts
    731
    Plugin Contributions
    3

    Default Re: Need Help Please

    else $image = substr(strrchr($product_image[$i])), '/', 1;

    If you put the closing brackets in the right place, it might work better?
    Perhaps you mean

    else $image = substr(strrchr($product_image[$i], '/'), 1);

  7. #7
    Join Date
    May 2007
    Posts
    69
    Plugin Contributions
    0

    Default Re: Need Help Please

    returns the same error

  8. #8
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Need Help Please

    Make a backup of the file.

    On the error block you mentionned, if you replace it with this one:

    PHP Code:
    if (eregi('\\'$product_name[$i])) {
        
    $image substr($product_image[$i], 1);
    } else {
        
    $image str_replace('\\''/'$image);
        
    $image substr($image1);

    Will it still return the same error message ?

  9. #9
    Join Date
    May 2007
    Posts
    69
    Plugin Contributions
    0

    Default Re: Need Help Please

    thx oracle that code seems to have worked ...

    next error lol

    Parse error: syntax error, unexpected T_STRING in /home/tower/public_html/admin/quick_add_products.php on line 66

    Code:
    $db->Execute("INSERT INTO " . TABLE_PRODUCTS_TO_CATEGORIES . " VALUES ('" . $products_id->products_id . "', '" . $product_categories[$i] . "'));
    note there is only a few lines left of code before it starts to display the page... hopefully this will be all that faults...

 

 

Similar Threads

  1. v150 I need help with my product listing please help im going insane!!
    By Darion in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 10 Sep 2012, 04:16 AM
  2. v150 I need help with my product listing please help im going insane!!
    By Darion in forum General Questions
    Replies: 1
    Last Post: 10 Sep 2012, 02:12 AM
  3. please help need help for reviews and tips page
    By abs007 in forum General Questions
    Replies: 2
    Last Post: 9 Apr 2009, 02:14 PM
  4. Need help with color scheme - URGENT PLEASE HELP
    By nepton in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Nov 2008, 03:48 AM
  5. Mcafee scan says I need to fix I need help please??
    By touchclothing in forum General Questions
    Replies: 2
    Last Post: 30 Sep 2008, 08:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg