Reply to Dreamweaver & PHP

Your name:

Reply:


Posted by Divorcee In Waiting on 09/26/05 03:20

I'm trying to create a query with mysql, and my recordset is displaying
information properly, but when I upload the page, i get the following error:

Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$'
in /homepages/23/d91401863/htdocs/Soccer/titans/sept17/t-sept17.php on line
13

Here's the code: (i numbered the lines to 13)
01 <?php require_once('../../Connections/Soccer.php'); ?>
02 <?php
03 $currentPage = $HTTP_SERVER_VARS["PHP_SELF"];
04
05 $maxRows_Recordset1 = 1;
06 $pageNum_Recordset1 = 0;
07 if (isset($HTTP_GET_VARS['pageNum_Recordset1'])) {
08 $pageNum_Recordset1 = $HTTP_GET_VARS['pageNum_Recordset1'];
09 }
10 $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
11
12 $varTeam_Recordset1 = "Titans";
13 if (isset(Request("Team"))) {
14 $varTeam_Recordset1 = (get_magic_quotes_gpc()) ? Request("Team") :
addslashes(Request("Team"));
}
$varDate_Recordset1 = "09/17/2005";
if (isset(Request("Date"))) {
$varDate_Recordset1 = (get_magic_quotes_gpc()) ? Request("Date") :
addslashes(Request("Date"));
}
mysql_select_db($database_Soccer, $Soccer);
$query_Recordset1 = sprintf("SELECT Soccer.Team, Soccer.Date, Soccer.Main,
Soccer.Previous, Soccer.Next, Soccer.PhotoID FROM Soccer WHERE Soccer.Team =
'%s' AND Soccer.Date = '%s' ORDER BY Soccer.PhotoID",
$varTeam_Recordset1,$varDate_Recordset1);
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1,
$startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $Soccer) or
die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($HTTP_GET_VARS['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $HTTP_GET_VARS['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($HTTP_SERVER_VARS['QUERY_STRING'])) {
$params = explode("&", $HTTP_SERVER_VARS['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . implode("&", $newParams);
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s",
$totalRows_Recordset1, $queryString_Recordset1);
?>

What gives? I'm not that up on php/sql code, so what is Dreamweaver doing
that I need to fix?

Thanks!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация