Page 1 of 2

Parse Error

Posted: Tue Jan 20, 2004 2:09 pm
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

Posted: Tue Jan 20, 2004 2:10 pm
by markl999
<?php esc limit 0,10"; <-- ???

Posted: Tue Jan 20, 2004 2:13 pm
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

Posted: Tue Jan 20, 2004 2:15 pm
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.

Posted: Tue Jan 20, 2004 2:17 pm
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

Posted: Tue Jan 20, 2004 2:18 pm
by phpcoder

Code: Select all

<?php esc limit 0,10";
u have closing double " qoutes but not starting .

Posted: Tue Jan 20, 2004 2:19 pm
by TonysDesigns
phpcoder wrote:

Code: Select all

<?php esc limit 0,10";
u have closing double " qoutes but not starting .
How shoud it be ?

Posted: Tue Jan 20, 2004 2:23 pm
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.

Posted: Tue Jan 20, 2004 2:30 pm
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

Posted: Tue Jan 20, 2004 2:31 pm
by phpcoder
yep there is no need for

Code: Select all

<?php esc limit 0,10";
its not parse erro its copy error :wink:

Posted: Tue Jan 20, 2004 2:33 pm
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>";
?>

Posted: Tue Jan 20, 2004 2:36 pm
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>";
?>

Posted: Tue Jan 20, 2004 2:40 pm
by markl999
Nice looking site. What did you use to create it out of interest? Something like Dreamweaver or all hand coded html?

Posted: Tue Jan 20, 2004 2:45 pm
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?

Posted: Tue Jan 20, 2004 5:05 pm
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.