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
Post
by TonysDesigns » Tue Jan 20, 2004 2:09 pm
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)
{
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 "</table>";
?>
<?php esc 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>";
?>
Having the Parse Error on Line 36. Any help is GREATLY appreciated
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Tue Jan 20, 2004 2:10 pm
<?php esc limit 0,10"; <-- ???
TonysDesigns
Forum Newbie
Posts: 8 Joined: Tue Jan 20, 2004 2:09 pm
Post
by TonysDesigns » Tue Jan 20, 2004 2:13 pm
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
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Tue Jan 20, 2004 2:15 pm
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 » Tue Jan 20, 2004 2:17 pm
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
phpcoder
Forum Contributor
Posts: 158 Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK
Post
by phpcoder » Tue Jan 20, 2004 2:18 pm
u have closing double " qoutes but not starting .
TonysDesigns
Forum Newbie
Posts: 8 Joined: Tue Jan 20, 2004 2:09 pm
Post
by TonysDesigns » Tue Jan 20, 2004 2:19 pm
phpcoder wrote:
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 » Tue Jan 20, 2004 2:23 pm
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 » Tue Jan 20, 2004 2:30 pm
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
phpcoder
Forum Contributor
Posts: 158 Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK
Post
by phpcoder » Tue Jan 20, 2004 2:31 pm
yep there is no need for
its not parse erro its copy error
redmonkey
Forum Regular
Posts: 836 Joined: Thu Dec 18, 2003 3:58 pm
Post
by redmonkey » Tue Jan 20, 2004 2:33 pm
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 » Tue Jan 20, 2004 2:36 pm
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>";
?>
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Tue Jan 20, 2004 2:40 pm
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 » Tue Jan 20, 2004 2:45 pm
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 » Tue Jan 20, 2004 5:05 pm
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.