Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Understanding Parse Error

New Here ,
Mar 06, 2007 Mar 06, 2007
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;
TOPICS
Server side applications
709
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2007 Mar 06, 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/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2007 Mar 06, 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. 😞
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2007 Mar 06, 2007
RAmeeti wrote:
> What might you suggest I do from here? I am just trying to work through some
> examples in a tutorial. :-(

Move on to a different tutorial.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2007 Mar 06, 2007
RAmeeti wrote:

>>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. :-(
>
If you copied and pasted the example, make sure there are no unwanted
characters. BTDT.
Mick
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2009 Apr 06, 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);

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 06, 2009 Apr 06, 2009
LATEST

$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;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines