Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

parse error, unexpected T_LNUMBER


Catrine

Recommended Posts

Posted

I get this error message when I try to look at my information.php, I really can?t understand what the error means, and I can?t find anything that is wrong ;)

 

Does anyone know what I should look for...

 

Parse error: parse error, unexpected T_LNUMBER in /home/virtual/streetpower.se/public_html/catalog/information.php on line 20

 

And line 20 is an empty line...

Posted

Here is the code, i can?t find the error...

 

<?php

/*

Module: Information Pages Unlimited

File date: 2003/03/03

Based on the FAQ script of adgrafics

Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// Added for information pages

if(!$HTTP_GET_VARS['info_id']) die("No page found.");

$info_id = $HTTP_GET_VARS['info_id'];

 

$sql=mysql_query('SELECT * FROM '.TABLE_INFORMATION.' WHERE visible='1' AND information_id=''.$info_id.''') or die(mysql_error());

$row=mysql_fetch_array($sql);

$INFO_TITLE = stripslashes($row['info_title']);

$INFO_DESCRIPTION = stripslashes($row['description']);

 

// Only replace cariage return by <BR> if NO HTML found in text

// Added as noticed by infopages module

if (!preg_match("/([<])([^>]{1,})*([>])/i", $INFO_DESCRIPTION)) {

$INFO_DESCRIPTION = str_replace("rn", "<br>rn", $INFO_DESCRIPTION );

}

 

// Need to do a check for if session is found...

$INFO_FILELINK = FILENAME_INFORMATION .

(stristr(tep_href_link(FILENAME_INFORMATION, '', 'NONSSL'), '?')?'&':'?') .

'info_id=' . $row['information_id'];

 

$breadcrumb->add($INFO_TITLE, tep_href_link($INFO_FILELINK, '', 'NONSSL'));

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

Posted

Hi,

 

It was hard from your post to see what line 20 was, so I downloaded "Information Pages Unlimited". There are actually 5 files called 'information.php', so I hope I'm looking at the right one.

 

It would appear your lines 19 to 20 are:

 

$sql=mysql_query('SELECT * FROM '.TABLE_INFORMATION.' WHERE visible='1' AND information_id=''.$info_id.''') or die(mysql_error());
$row=mysql_fetch_array($sql);

 

and considering I'm not that good at PHP; all I know is most parse errors I get, it actually falls over on the preceeding line, therefore your line establishing the variable "$sql" should be:

 

  $sql=mysql_query('SELECT * FROM '.TABLE_INFORMATION.' WHERE visible=\'1\' AND information_id=\''.$info_id.'\'') or die(mysql_error());

 

That's a wild guess, I'm just comparing the download to what you posted.

 

Peter

Archived

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

×
×
  • Create New...