Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse Error - Help


Guest

Recommended Posts

Hi all,

I finally got a banner up, was deleting and changing the wording on my opening page, came to the last paragraph and must have taken something out i dont know what it is

When i load my site i get

Parse error: syntax error, unexpected T_STRING in /home/adawn/public_html/catalogjfs/includes/languages/english/index.php on line 14

I dont even know what a Parse error is.. Can someone help me get it back please

Kind regards Dawn

Link to comment
Share on other sites

Hi all,

I finally got a banner up, was deleting and changing the wording on my opening page, came to the last paragraph and must have taken something out i dont know what it is

When i load my site i get

Parse error: syntax error, unexpected T_STRING in /home/adawn/public_html/catalogjfs/includes/languages/english/index.php on line 14

I dont even know what a Parse error is.. Can someone help me get it back please

Kind regards Dawn

 

Given that the parse error is in a language file I'll take an educated guess that you have an unescaped ' (single quote)

 

Language defines are written like ..

 

define( 'THIS_DEFINE', 'I am some text' );

 

The quotes surrounding the I am some text are very important as they dictate where the php function ends and the text begins/ends.

 

If you have a single quote also in the text .. like ..

 

define( 'THIS_DEFINE', 'I'm am some text' );

 

PHP will reject it with a parse error as it cannot read it. To enable PHP to parse it correctly you have to escape the single quote with a slash like \'.

 

So the following would be fine ..

 

define( 'THIS_DEFINE', 'I\'m am some text' );

Link to comment
Share on other sites

Hi thankyou for your answer, im sorry but im very green at this, unfortunately after playing around with it for a few hours I still cant get it right, Im not sure where to put the line that you have kindly given me. Each time i keep getting an error, I have cut and pasted below the stuff i have been working with and the error showing now, maybe you would be kind enough to tell me where to put in the define.

 

 

define('TEXT_MAIN', 'Welcome to Jewelry For Sale <b>Here we offer many different types of Jewelery made from all metals.</b>. Included are all carats of Gold, Sterling Silver and White Gold.<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top">;<b>We also offer for sale a wonderful range of Electroplate, Gold Layered and Plated Jewelry. <br>define( 'THIS_DEFINE', 'I\'m am some text' ); <br>This shop is running on osCommerce Online Merchant v2.2 RC2a}

 

Parse error: syntax error, unexpected T_STRING in /home/adawn/public_html/catalogjfs/includes/languages/english/index.php on line 13

 

I appreciate your help, thank you so much...

Kindest regards Dawn

Link to comment
Share on other sites

He was just giving you an example, not telling you what to put in your code.

 

That said, try changing that jumble of code to say:

 

define('TEXT_MAIN', 'Welcome to Jewelry For Sale <b>Here we offer many different types of Jewelery made from all metals.</b> Included are all carats of Gold, Sterling Silver and White Gold.<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . 'default/1.gif') . '</td><td class="main" valign="top">; <b>We also offer for sale a wonderful range of Electroplate, Gold Layered and Plated Jewelry. <br><br>This shop is running on osCommerce Online Merchant v2.2 RC2a');

 

It may do you good to look further into HTML and even basic PHP in the future. It's fun once you get past the learning curve. :rolleyes:

Link to comment
Share on other sites

Even with @Byrce's fix, your site is going to be messed up. Your code starts a table, puts one row with two cells in it, and then leaves it unfinished. Try this instead, and add more text back in as you get accustomed to it:

define('TEXT_MAIN', 'Welcome to Jewelry For Sale <b>Here we offer many different types of Jewelery made from all metals.</b>. 
Included are all carats of Gold, Sterling Silver and White Gold.<br>
<b>We also offer for sale a wonderful range of Electroplate, Gold Layered and Plated Jewelry.</b> <br><br>
This shop is running on osCommerce Online Merchant v2.2 RC2a');

Link to comment
Share on other sites

He was just giving you an example, not telling you what to put in your code.

 

That said, try changing that jumble of code to say:

 

 

 

It may do you good to look further into HTML and even basic PHP in the future. It's fun once you get past the learning curve. :rolleyes:

 

To everyone concerned with helping me on these above issues, I do appreciate the help, and Bryce that looks a whole lot better, I HAVE been studying HTML on and off, first at a college and now at home. I live in the country (isolated)and the only way to study it is on the net now, so yes I am bumbling through a fair bit. I do enjoy it, and Ill try to work it out without troubling people on here more.

 

Thankyou to all once again...

Kindest regards Dawn

Link to comment
Share on other sites

Even with @Byrce's fix, your site is going to be messed up. Your code starts a table, puts one row with two cells in it, and then leaves it unfinished. Try this instead, and add more text back in as you get accustomed to it:

define('TEXT_MAIN', 'Welcome to Jewelry For Sale <b>Here we offer many different types of Jewelery made from all metals.</b>. 
Included are all carats of Gold, Sterling Silver and White Gold.<br>
<b>We also offer for sale a wonderful range of Electroplate, Gold Layered and Plated Jewelry.</b> <br><br>
This shop is running on osCommerce Online Merchant v2.2 RC2a');

 

EXCELLANT you have been very kind thankyou very very much !!!

Ill keep at it , its looking better and better...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...