Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: help to code

  1. #1
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help to code

    Can somebody help?
    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\programmer\easyphp1-7\www\catalog\admin\configuration.php(125) : eval()'d code on line 1

    <?php
    /*
    $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $

    osCommerce, Open Source E-Commerce Solutions
    http://www.oscommerce.com

    Copyright (c) 2003 osCommerce

    Released under the GNU General Public License
    */

    require('includes/application_top.php');


    and her also

    I get this error: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in c:\programmer\easyphp1-7\www\catalog\admin\categories.php on line 800


    if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) {
    echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . ''">' . "n";
    } else {
    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . ''">' . "n";
    }

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Did you happen to notice our posting guidelines?

    http://www.codingforums.com/postguide.htm

    Specifically section 2.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no I just signup so I did not read the posting guidelines, but I like them so I will improve next time

    Do you happen to what mistake I have in the code?

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For the first error : the code with the error in isn't shown here.
    look on line 125 for eval() and then print out the code you evaled. the first line will contain the error.


    the second error is most liekly these 2 single quotes (highlighted in orange). But i think you completely messed up that echo altogether
    if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) {
    echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . ''">' . "n";
    } else {
    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . ''">' . "n";
    }
    some basic codelayour might do wonders ...
    Last edited by raf; 05-24-2004 at 10:02 PM.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #5
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tryed ',' and ';' and with out same same I don't know what do do with it, I'm new on codeing

    here is line 125
    eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');

  • #6
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK this was the problem on (I get this error: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in c:\programmer\easyphp1-7\www\catalog\admin\categories.php on line 800)

    Code:
    echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . ''">' . "n";
          } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . ''">' . "n";
          }
    replaced with


    Code:
    echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '\'">' . "\n";
          } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '\'">' . "\n";
          }


    and





    Code:
    echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '\'">' . "\n";
          } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n";
          }
    replaced with



    Code:
    echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . ''">' . "n";
          } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . ''">' . "n";
          }

    now time to look on the other problem

  • #7
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't find the problem on this one


    Code:
    switch ($action) {
        case 'edit':
          $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');
    
          if ($cInfo->set_function) {
            eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');
          } else {
            $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);
          }

  • #8
    avu
    avu is offline
    New Coder
    Join Date
    May 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I will stop this thread and start a new with the last problem

    http://www.codingforums.com/showthre...327#post204327


  •  

    Posting Permissions

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