Parse Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Parse Error

Post by TonysDesigns »

I think I am having an issue with some syntax. Here is the code:

Code: Select all

<?php
include_once("admin/header.php");
include_once("class/review.php");
include_once("class/subcategory.php");
include_once("class/category.php");
include_once("class/brand.php");
include_once("class/users.php");
include_once("class/product.php");
include_once("class/grid.php");
include_once("reviews/message.php");
$flagReview="set";

$revObj=new review("");
$numRevs=$revObj->getCountReview();
print "<table border=0 class=notefont>
	<tr><td><b>Total Number of Reviews: $numRevs</b></td></tr>";

$st = "SELECT * FROM TblReview order by create_dt desc limit 0,10";
$rc = mysql_query($st) or die(mysql_error());
$numprobs=mysql_num_rows($rc);
if($numprobs<1)
&#123;
	print "<tr><td height=20 valign=top align=center><font
		class='mesg'>$M_norecord</font></center></td></tr>";
&#125;
else
&#123;
	while ($a_row=mysql_fetch_array($rc))
	&#123;
		$gridObj=new grid();
		$gridObj->displayLatestGrid($a_row);
	&#125;
&#125;
print "</table>";
?>
<?php esc limit 0,10";
$rc = mysql_query($st) or die(mysql_error());
$numprobs=mysql_num_rows($rc);
if($numprobs<1)
&#123;
	print "<tr><td height=20 valign=top align=center><font
		class='mesg'>$M_norecord</font></center></td></tr>";
&#125;
else
&#123;
	while ($a_row=mysql_fetch_array($rc))
	&#123;
		$gridObj=new grid();
		$gridObj->displayLatestGrid($a_row);
	&#125;
&#125;
print "<tr><td><br><br>beauty reviews provided by <a href='http://www.makeuptalk.com'>www.MakeupTalk.com</a></td></tr>";
print "</table>";
?>
Having the Parse Error on Line 36. Any help is GREATLY appreciated
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

<?php esc limit 0,10"; <-- ???
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

markl999 wrote:<?php esc limit 0,10"; <-- ???
Are you asking? If you are that is PRESICELY my issue...

I am not a Php master, I was just copying and pasting some code and WHAMMO...parse erro
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Well it's invalid syntax, looks to me likes it's a copy and paste error and it should just be <?php
i.e remove the 'esc limit 0,10";' bit

In fact, you don't need to do
?>
<?php

Just remove those 2 lines.
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

markl999 wrote:Well it's invalid syntax, looks to me likes it's a copy and paste error and it should just be <?php
i.e remove the 'esc limit 0,10";' bit
So I should REMOVE that part huh? Let me give that a try
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

Post by phpcoder »

Code: Select all

<?php esc limit 0,10";
u have closing double " qoutes but not starting .
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

phpcoder wrote:

Code: Select all

<?php esc limit 0,10";
u have closing double " qoutes but not starting .
How shoud it be ?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Looks to me like you have duplicated most of the code.

It also looks like you could remove everything from (and including) <?php esc limit 0,10"; down. This is just a duplicate of what you already have I see no reason for it.
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

redmonkey wrote:Looks to me like you have duplicated most of the code.

It also looks like you could remove everything from (and including) <?php esc limit 0,10"; down. This is just a duplicate of what you already have I see no reason for it.
I see some dups there, but I do see a part that I do need to keep that isnt a dup:

Code: Select all

beauty reviews provided by <a href='http://www.makeuptalk.com'>www.MakeupTalk.com</a>
THat isnt a dup

Just not sure how to finish this
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

Post by phpcoder »

yep there is no need for

Code: Select all

<?php esc limit 0,10";
its not parse erro its copy error :wink:
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Give this a shot...

Code: Select all

<?php
include_once("admin/header.php");
include_once("class/review.php");
include_once("class/subcategory.php");
include_once("class/category.php");
include_once("class/brand.php");
include_once("class/users.php");
include_once("class/product.php");
include_once("class/grid.php");
include_once("reviews/message.php");
$flagReview="set";

$revObj=new review("");
$numRevs=$revObj->getCountReview();
print "<table border=0 class=notefont>
   <tr><td><b>Total Number of Reviews: $numRevs</b></td></tr>";

$st = "SELECT * FROM TblReview order by create_dt desc limit 0,10";
$rc = mysql_query($st) or die(mysql_error());
$numprobs=mysql_num_rows($rc);
if($numprobs<1)
{
   print "<tr><td height=20 valign=top align=center><font
      class='mesg'>$M_norecord</font></center></td></tr>";
}
else
{
   while ($a_row=mysql_fetch_array($rc))
   {
      $gridObj=new grid();
      $gridObj->displayLatestGrid($a_row);
   }
}
print "<tr><td><br><br>beauty reviews provided by <a href='http://www.makeuptalk.com'>www.MakeupTalk.com</a></td></tr>";
print "</table>";
?>
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

WORD UP!

Thank you verymuch, I am just learning PHP...and will be learning now MORE

Thanks again

All Fixed: see it here: http://www.makeuptalk.com/index.php

redmonkey wrote:Give this a shot...

Code: Select all

<?php
include_once("admin/header.php");
include_once("class/review.php");
include_once("class/subcategory.php");
include_once("class/category.php");
include_once("class/brand.php");
include_once("class/users.php");
include_once("class/product.php");
include_once("class/grid.php");
include_once("reviews/message.php");
$flagReview="set";

$revObj=new review("");
$numRevs=$revObj->getCountReview();
print "<table border=0 class=notefont>
   <tr><td><b>Total Number of Reviews: $numRevs</b></td></tr>";

$st = "SELECT * FROM TblReview order by create_dt desc limit 0,10";
$rc = mysql_query($st) or die(mysql_error());
$numprobs=mysql_num_rows($rc);
if($numprobs<1)
{
   print "<tr><td height=20 valign=top align=center><font
      class='mesg'>$M_norecord</font></center></td></tr>";
}
else
{
   while ($a_row=mysql_fetch_array($rc))
   {
      $gridObj=new grid();
      $gridObj->displayLatestGrid($a_row);
   }
}
print "<tr><td><br><br>beauty reviews provided by <a href='http://www.makeuptalk.com'>www.MakeupTalk.com</a></td></tr>";
print "</table>";
?>
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Nice looking site. What did you use to create it out of interest? Something like Dreamweaver or all hand coded html?
TonysDesigns
Forum Newbie
Posts: 8
Joined: Tue Jan 20, 2004 2:09 pm

Post by TonysDesigns »

The site was originally created in Photohop CS by yours truly, then partially hand coded and TABLED up in Frontpage 03, can you imagine...Frontpage 2003

But at any rate, then my team and I coded it up for the DB


markl999 wrote:Nice looking site. What did you use to create it out of interest? Something like Dreamweaver or all hand coded html?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Not quite my scene but a nice looking site in IE, you should note that when viewing with Mozilla browser the the actual source code for your javascript random image link is dumped on to screen.
Post Reply