PDA

View Full Version : Parse Error / Syntax Error line 13


robert222776
04-22-2009, 12:09 PM
After adding a cart button uploading to server, receive this error. Line 13 in DW is a {. All the code was generated by the add to cart button function:

Here are lines 9-19:

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

The button displays in design view, and the button form code appears to be ok.

BTW, are bindings such as description required, or can they be left to default?

Thanks!

Ray Borduin
04-22-2009, 12:33 PM
The code referenced is actually created by the Dreamweaver Recordset. I don't see the problem with it, so I would suggest including this file in a support ticket and they can look through the code above, my guess is that is where the error originates.

Most bindings are optional, but some you may need depending on your shipping and checkout provider requirements. I think ID, Price are the only ones eCart really needs. Weight is necessary for any shipping providers, and some payment providers require name and description.

So they aren't required by eCart, but may be required at some point depending on what you end up doing with it.

robert222776
04-22-2009, 01:10 PM
Thanks Ray. I will submit a ticket.