...

View Full Version : help to code



avu
05-24-2004, 08:50 PM
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";
}

Spookster
05-24-2004, 09:01 PM
Did you happen to notice our posting guidelines?

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

Specifically section 2.

avu
05-24-2004, 09:25 PM
no I just signup so I did not read the posting guidelines, but I like them so I will improve next time :thumbsup:

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

raf
05-24-2004, 09:59 PM
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 ...

avu
05-24-2004, 10:22 PM
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) . '");');

avu
05-24-2004, 11:57 PM
OK :thumbsup: 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)



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




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







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





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

avu
05-25-2004, 01:04 AM
I don't find the problem on this one




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);
}

avu
05-25-2004, 12:11 PM
I will stop this thread and start a new with the last problem

http://www.codingforums.com/showthread.php?p=204327#post204327



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum