Page 1 of 1
[56K WARN] parse error
Posted: Fri Aug 17, 2007 1:30 pm
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']);
?>
Posted: Fri Aug 17, 2007 1:52 pm
by Mightywayne
Try setting:
$_GET['publisher']
To a variable, like...
$publisher = $_GET['publisher'];
Also, you seem to randomly end the { and not close it.
Re: parse error
Posted: Fri Aug 17, 2007 2:35 pm
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.
Posted: Fri Aug 17, 2007 2:36 pm
by miro_igov
but what is the content of ader.php ?
Posted: Fri Aug 17, 2007 3:08 pm
by Ollie Saunders
close the if with a closing brace - }
Posted: Fri Aug 17, 2007 3:12 pm
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.
Posted: Fri Aug 17, 2007 3:22 pm
by superdezign
I simply think it's the wrong file, or the wrong lines.
Posted: Fri Aug 17, 2007 10:46 pm
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";
?>
Posted: Fri Aug 17, 2007 10:51 pm
by Benjamin
The parse error is on line 19, not 3.
Posted: Fri Aug 17, 2007 11:08 pm
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:

Posted: Fri Aug 17, 2007 11:46 pm
by Benjamin
It's on line 19.
Posted: Sat Aug 18, 2007 12:36 am
by m2babaey
$lim=!!!!function!!!! getlim($adnum,$maxn);
what a ...