Need Help With Parse Error...

Reply

Join Date: May 2005
Posts: 1
Reputation: yesterda is an unknown quantity at this point 
Solved Threads: 0
yesterda yesterda is offline Offline
Newbie Poster

Need Help With Parse Error...

 
0
  #1
May 7th, 2005
ok, i'm really new to php, and i was trying to edit some text, and after i changed it i musta screwed something up because now i get a parse error unexpected t_string line 23, here is the code...

<?php
//
// +----------------------------------------------------------------------+
// |zen-cart Open Source E-commerce |
// +----------------------------------------------------------------------+
// | Copyright (c) 2003 The zen-cart developers |
// | |
// | http://www.zen-cart.com/index.php |
// | |
// | Portions Copyright (c) 2003 osCommerce |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the GPL license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.zen-cart.com/license/2_0.txt. |
// | If you did not receive a copy of the zen-cart license and are unable |
// | to obtain it through the world-wide-web, please send a note to |
// | license@zen-cart.com so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// $Id: index.php 290 2004-09-15 19:48:26Z wilt $
//

define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');

// Showcase vs Store
if (STORE_STATUS == '0') {
define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?');
} else {
define('TEXT_GREETING_GUEST', 'Welcome, please enjoy our online showcase.');
}


Please help me... i need to get my page back up...
Thanx
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 2
Reputation: PeterB is an unknown quantity at this point 
Solved Threads: 0
PeterB PeterB is offline Offline
Newbie Poster

Re: Need Help With Parse Error...

 
0
  #2
May 8th, 2005
define('TEXT_MAIN', 'To celebrate National Scrapbooking Day, May 7th, Yesterday-Remembered is having our first ever contest! Use any of our kits, excluding freebies, to make a layout and post it at your favorite gallery. The first five people to email mirranda@yesterday-remembered.com with a link to the layout will recieve a gift certificate for a free kit. All participants will recieve a special bonus. To make the deal even sweeter, all kits will be 20% off through Sunday May 8!!! Good luck, we can't wait to see what you create. </strong>');

You need to replace the ' above with \'.

Why? Well, this is because you are typing a string in PHP, using single quotes to tell PHP where the string starts and ends. The problem is... PHP sees your string above seems to end early, just after can , and then sees a lot of random characters afterwards that it doesn't understand.

By adding a \ in front of the ' in the string, you are telling PHP that the ' doesn't end the string. So it continues reading on until the end.

Hope that helps!
Peter
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC