Jump to content

[SOLVED] help?


shaunbaird

Recommended Posts

Hiya, wanting to implement banners on my site for my members.:

if (mysql_num_rows($res) != 0) {

echo("<p><font size=2><b>You must host these banners yourself!<br>Right click on the image and choose 'Save Picture As..'</b></font></p>");

for ($i = 0; $i < mysql_num_rows($res); $i++) {

    $bid = mysql_result($res, $i, "id");

    $imageurl = mysql_result($res, $i, "imageurl");

    $n = $i + 1;

    echo("<p><b><font face=$fontface size=2>Banner $n:</b><br><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" onMouseOver=\"window.status='Right click here and choose \'Save Picture As..\''; return true\" onMouseOut=\"window.status='$title'\"><img src=\"$imageurl\" border=0></a><br></p><textarea cols="70" rows="6" wrap="off" style="font-size: 11px;"><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" target="_blank"><img src=\"$imageurl\" border="0" alt="Hitinsomnia manual traffic exchange with geographical targeting" />");

</a></textarea>

 

 

 

 

 

 

 

 

}

}

include($mfoot);

mysql_close;

exit;

?>

 

 

 

showing the banner itself works just fine but recently I added the bit to add the code in a box under the banner so members can see an affiliate banner and the html code under it to post into other websites.

 

just keep getting this error now:

Parse error: syntax error, unexpected T_LNUMBER in /home/XXXXXXXX/public_html/XXXXXXX/refbanners.php on line 25

 

 

here is the full code from this page:

<?php

session_start();

include("phpinc.incfile.php");

include($varsfile);

include($funcsfile);

include($authfile);

mysql_connect($ssqldb_rhost, $ssqldb_ruser, $ssqldb_rpswd);

mysql_select_db($ssqldb_exchname);

$http_ref_page = $_SERVER['HTTP_REFERER'];

$res = checkauth();

if ($check_referrers == 1) {

checkRefer($http_ref_page);

}

$usrid = mysql_result($res, 0, "id");

$res = mysql_query("select * from refban order by id asc");

include($mhead);

echo("<p><font size=2>Your referring URL:<br><input type=text size=40 value=\"$site_url/?rid=$usrid\"></b></p>");

echo("<p></p>");

if (mysql_num_rows($res) != 0) {

echo("<p><font size=2><b>You must host these banners yourself!<br>Right click on the image and choose 'Save Picture As..'</b></font></p>");

for ($i = 0; $i < mysql_num_rows($res); $i++) {

    $bid = mysql_result($res, $i, "id");

    $imageurl = mysql_result($res, $i, "imageurl");

    $n = $i + 1;

    echo("<p><b><font face=$fontface size=2>Banner $n:</b><br><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" onMouseOver=\"window.status='Right click here and choose \'Save Picture As..\''; return true\" onMouseOut=\"window.status='$title'\"><img src=\"$imageurl\" border=0></a><br></p><textarea cols="70" rows="6" wrap="off" style="font-size: 11px;"><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" target="_blank"><img src=\"$imageurl\" border="0" alt="xxx" />");

</a></textarea>

 

 

 

 

 

 

 

 

}

}

include($mfoot);

mysql_close;

exit;

?>

Link to comment
https://forums.phpfreaks.com/topic/141338-solved-help/
Share on other sites

You have unescaped quotes in this line.

echo("<p><b><font face=$fontface size=2>Banner $n:</b><br><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" onMouseOver=\"window.status='Right click here and choose \'Save Picture As..\''; return true\" onMouseOut=\"window.status='$title'\"><img src=\"$imageurl\" border=0></a><br></p><textarea cols="70" rows="6" wrap="off" style="font-size: 11px;"><a href=\"$site_url/?rid=$usrid\" target=\"_blank\" target="_blank"><img src=\"$imageurl\" border="0" alt="xxx" />");

 

Notice that you use " to start and end a string to be echoed. If you need to use " inside this string, you have to put \ before it so it look like \"

Link to comment
https://forums.phpfreaks.com/topic/141338-solved-help/#findComment-739789
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.