|
Joined: Oct 2008
Posts: 104
Member
|
Member
Joined: Oct 2008
Posts: 104 |
Good Day All,
Trying to set up a banner/ad rotator in a custom island.
When i add the code and submit, I get an error message: ?> ?> Parse error: syntax error, unexpected '<' in /var/www/html/forum/cache_builders/custom/portal_box_109.php on line 2
I put the code in
/* PHP CODE HERE, IF NECESSARY */ <?php $banner1 = '<a href="http://www.pianosupplies.com/piano/lamps.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/GPLED22D2thumb.jpg" alt="Piano Lamp LED" title="BANNER1_TITLE"></a>'; $banner2 = '<a href="http://www.pianosupplies.com/piano/scarves.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/Pashmina_Scarfs_sm.jpg" alt="Music Theme Scarves" title="BANNER2_TITLE"></a>'; $banner3 = '<a href="http://www.pianosupplies.com/piano/Caster_Cups_Piano.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/Caster-Cups-Mediumthumb.jpg" alt="Caster Cups for Pianos" title="BANNER3_TITLE"></a>'; $banner4 = '<a href="http://www.pianosupplies.com/piano/PianoWire.html" target="_blank"><img src="http://pianoworld.com/wp-content/Store_Stuff/images/thumbs/thumb_MapesWire.jpg" alt="Piano Wire Music Wire Piano Strings" title="BANNER4_TITLE"></a>'; $banners = array($banner1, $banner2, $banner3, $banner4); shuffle($banners); ?>
Then I ad the snippet to call the code here:
/* DO NOT CHANGE THE LINE BELOW */ $body = <<<EOF
<div> <?php print $banners[0] ?> </div>
Any idea what I'm doing wrong, or what I should do differently?
As always, thank you for any help.
Best, Frank B.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Remove the PHP open/close tags from the "PHP CODE HERE, IF NECESSARY" area, the data is already stored with proper formatting.
|
|
|
|
Joined: Oct 2008
Posts: 104
Member
|
Member
Joined: Oct 2008
Posts: 104 |
Thank you Gizmo, so easy when you know the right way to do it :-) Works fine now.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
It happens to the best of us at times; I'm glad it got sorted so easy
|
|
|
2 members (Ruben, ahmed047),
776
guests, and
161
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|