[56K WARN] 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

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

[56K WARN] parse error

Post by m2babaey »

Hi
Here i get a strange parse error that can't get why happens.
the error is: Parse error: parse error in g:\programs new\easyphp\www\adcenter\ader.php on line 3
the first 6 lines of the code is:

Code: Select all

<?php
include 'global.php';
if (isset($_GET['publisher']))
{
$adid=clean($_GET['adid']);
$publisher=clean($_GET['publisher']);
?>
Mightywayne
Forum Contributor
Posts: 237
Joined: Sat Dec 09, 2006 6:46 am

Post by Mightywayne »

Try setting:

$_GET['publisher']

To a variable, like...

$publisher = $_GET['publisher'];

Also, you seem to randomly end the { and not close it.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: parse error

Post by superdezign »

m2babaey wrote:Hi
Here i get a strange parse error that can't get why happens.
the error is: Parse error: parse error in g:\programs new\easyphp\www\adcenter\ader.php on line 3
the first 6 lines of the code is:

Code: Select all

<?php
include 'global.php';
if (isset($_GET['publisher']))
{
$adid=clean($_GET['adid']);
$publisher=clean($_GET['publisher']);
?>
I see no parse error at line 3.
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

but what is the content of ader.php ?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

close the if with a closing brace - }
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

These are the first 6 lines as he said, maybe it is closed somewhere at bottom but he does not want to show us the full source.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

I simply think it's the wrong file, or the wrong lines.
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Post by m2babaey »

no. i'm not an advance programmer to hide my codes. i just was sleep. here is the full ader.php:

Code: Select all

<?php
include 'global.php';
if (isset($_GET['publisher']))
{
$adid=clean($_GET['adid']);
$publisher=clean($_GET['publisher']);
$sql="SELECT * FROM adsetting WHERE id='$adid'";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
$maxn=$row['max'];
$adnum=$row['adsize'];
$mouse=$row['mouse'];
$borderc=$row['border'];
$titlec=$row['title'];
$backgroundc=$row['background'];
$descriptionc=$row['description'];
$urlc=$row['url'];
// how many ads?=$limit=$lim
$lim=function getlim($adnum,$maxn);
//adsize? = $siz 468 or 790=horz=1  and other=vert=2
 $keyword=$row['keyword'];
$sql2="SELECT * FROM listing WHERE keywords LIKE '%$keyword%' ORDER BY maxb DESC  LIMIT $lim ";
$result2=mysql_query($sql2) or die (mysql_error());
?>
<table>
<tr>
<td align=left>Ads by Textly.fr</td> <td align=right ></td>
</tr>
<tr>
<table border=0 >
<?php
while($row2=mysql_fetch_array($result2)){
$listing=$row2['id'];
$advertiser=$row2['advertiser_id'];
$title=$row2['title '];
$url=$row2['url'];
$displayurl=$row2['displayurl'];
$description=$row2['description'];
//generate link:
$link="http://textly.fr/clicks.php?adid=$adid&publisher=$publisher&advertiser=$advertiser&listing=$listing";
// if 468 or 760 then <td> else <tr>
if ($siz=1 ) {
?>
<a href="<?php echo $link ?>" > <td bgcolor="<?php echo $backgroundc ; ?>">
<font color="<?php echo $titlec; ?>" onmouseover="<?php echo $mouse; ?> " > <?php echo $title;  ?></font><br>
<font color="<?php echo $descriptionc; ?>" > <?php echo $description;  ?></font><br>
<font color="<?php echo $urlc; ?>" > <?php echo $displayurl;?></font></td></a>
<?php
}
if ($siz=2 ) {
?>
<a href="<?php echo $link ?>" ><tr bgcolor="<?php echo $backgroundc ; ?>">
<font color="<?php echo $titlec; ?>" onmouseover="<?php echo $mouse; ?> " > <?php echo $title;  ?></font><br>
<font color="<?php echo $descriptionc; ?>" > <?php echo $description;  ?></font><br>
<font color="<?php echo $urlc; ?>" > <?php echo $displayurl;  ?></font>
</tr></a>
<?php
}
}
?>
</table>
</tr>
</table>
<?php
}
else echo "sorry";
?>
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

The parse error is on line 19, not 3.
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Post by m2babaey »

this is test.php:

Code: Select all

<iframe   src="ader.php?publisher=3&adid=6"  width=336  >

</iframe>
and this is the result:
Image
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

It's on line 19.
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Post by m2babaey »

$lim=!!!!function!!!! getlim($adnum,$maxn); :lol: :lol: :lol:
what a ...
Post Reply