Skip to main content
Participant
March 6, 2007
Question

Understanding Parse Error

  • March 6, 2007
  • 2 replies
  • 709 views
I am a newbie but am getting an error based on code that Dreamweaver wrote. I'm not seeing it. Is there something obvious I should be seeing or how to I get past this. Thanks.

Parse error: parse error in /test.php on line 4

<?php require_once('Connections/WinestoreConn.php'); ?>
<?php
$maxRows_Top3 = 3;
$pageNum_Top3 = 0;
if (isset($_GET['pageNum_Top3'])) {
$pageNum_Top3 = $_GET['pageNum_Top3'];
}
$startRow_Top3 = $pageNum_Top3 * $maxRows_Top3;
This topic has been closed for replies.

2 replies

Known Participant
April 6, 2009

Can someone please tell me why I am getting parse error. I am very new to this and all I did was just switched a field in my recordset. Not sure what is causing the parse error now..The browser shoing the error on ;ine 70.

$totalPages_shopping_db = ceil($totalRows_shopping_db/$maxRows_shopping_db = 10;

Thanks. Karamat

if (isset($_GET['totalRows_shopping_db'])) {
  $totalRows_shopping_db = $_GET['totalRows_shopping_db'];
} else {
  $all_shopping_db = mysql_query($query_shopping_db);
  $totalRows_shopping_db = mysql_num_rows($all_shopping_db);
}
$totalPages_shopping_db = ceil($totalRows_shopping_db/$maxRows_shopping_db = 10;

$pageNum_shopping_db = 0;
if (isset($_GET['pageNum_shopping_db'])) {
  $pageNum_shopping_db = $_GET['pageNum_shopping_db'];
}
$startRow_shopping_db = $pageNum_shopping_db * $maxRows_shopping_db;

mysql_select_db($database_shopping, $shopping);

David_Powers
Inspiring
April 6, 2009

$totalPages_shopping_db = ceil($totalRows_shopping_db/$maxRows_shopping_db = 10;

That line should look like this:

$totalPages_shopping_db = ceil($totalRows_shopping_db/$maxRows_shopping_db)-1;

Inspiring
March 6, 2007
RAmeeti wrote:
> I am a newbie but am getting an error based on code that Dreamweaver wrote. I'm
> not seeing it. Is there something obvious I should be seeing or how to I get
> past this. Thanks.
>
> Parse error: parse error in /test.php on line 4

There's nothing obviously wrong in the code snippet that you have
posted. Did the parse error give any further details?

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
RAmeetiAuthor
Participant
March 6, 2007
> Did the parse error give any further details?

It sure would be neat if it did! :-) I have another page that previews fine in my browser but this page only displays that single line when previewing. (The actual path to the file is more complete in the error.)

What might you suggest I do from here? I am just trying to work through some examples in a tutorial. :-(