Hi i must be stuppid by missing something but im trying to insert a a code into my php script page:

<!-- Start Code -->
<iframe src="http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true" background-color="transparent"></iframe>
<!-- End Code -->

this is a banner call code and works great in html pages but i want it to work in a php script page

this is part of the php script page i want it to go am i missing a code to add to make this work???

<!-- add extra info here at top -->
     <br>
<br>
This is where JV's banners go

?>
<html>
<!-- Start Code -->
<iframe src="http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true" background-color="transparent"></iframe>
<!-- End Code -->
</html>

<?php

if it helps the php script is on another domain and calling the banner iframe from another page.

works if i paste the code into a html page but not in my php page any help would be great thanks

Hi Nav33n thanks i have sorted the banner link they expired so made them longer and yes if you just put in web browser they work basically i have a giveaway script im using and all works fine im trying to put the banner iframe link into the part i want it to show in

<!-- add extra info here at top -->
<br>
<br>
This is where JV's banners go

this part is a section of the actual giveaay script that works and shows the " this is where JV banners goes " that shows as just text ok so i thought i could just add the banner code.

Now i know the banner code works in html files but i think im missing a tag???

the site it should work on is www.365giveaway.co.uk/

if you need the full page script let me know
thanks so far

Are you sure it isn't working ? Well, I have this code and it works. Oh, btw, I removed unwanted ?> and <?php .

//test.php
<!-- add extra info here at top -->
     <br>
<br>
This is where JV's banners go
<html>
<!-- Start Code -->
<iframe src="http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true" background-color="transparent"></iframe>
<!-- End Code -->
</html>

See the attached image for the screenshot !

HI i have enclosed the script as a zip and you have the code for the banner site but still im getting

Parse error: syntax error, unexpected T_STRING in /home/giveaway/public_html/2008/class/ClassJVMemberDisplay.php on line 41

hope it helps its really puzzling me beacuse as soon as i delete the banner code the www.365giveaway.co.uk site comes back live???

thanks any way if no more ideas i appreciate it

$main="<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\" class=box>
<tr align=\"center\">

<!-- add extra info here at top -->
<br>
<br>
This is where JV's banners go
<html><!-- Start Code --><iframe src="http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true" background-color="transparent"></iframe><!-- End Code --></html>

If you open your script in any good editor, you will see the problem yourself.
You have to escape " in this line.

<html><!-- Start Code --><iframe src="http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" allowtransparency="true" background-color="transparent"></iframe><!-- End Code --></html>

thanks but im lost i use notepad++ and not sure what you mean by (You have to escape " in this line.)

thanks any way for helping

I don't think you wrote this script. Did you ? hmm.. Anyway, use this script.

<?PHP
// $Id: ClassJVMemberDisplay.php,v 1.4 2008/03/31 16:55:59 scottcase Exp $

class JVMEMBERDISPLAY
{
	
function menu()
{
	if (isset($id))
	{
		$q=new DB;
		$query="select * from members where id='$id'";
		$q->query($query);
		$q->next_record();
		if ($q->f("paid")==0)
		{
			//$u="";
			$oto=" <a href=\"member.area.oto.php\">Purchase OTO</a> | ";
			$adboxallow="";
			//$u="";
			$oto="";
		}
		else
		{
			$u=" <a href=\"member.area.paid.php\">Download</a> | ";
			$adboxallow="<a href=\"index.php?page=adbox_module\">AdBox Module</a> |";
			$oto="";
		}
	}




	$main="<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"0\" class=box>
      <tr align=\"center\">

<!-- add extra info here at top -->
     <br>
<br>
This is where JV's banners go
<html><!-- Start Code --><iframe src=\"http://www.365netmarketing.co.uk/adds/banner.php?action=b&t=true&ref=20&w=468&h=60&grp=13\" width=\"468\" height=\"60\" marginwidth=\"0\" marginheight=\"0\" hspace=\"0\" vspace=\"0\" frameborder=\"0\" scrolling=\"no\" allowtransparency=\"true\" background-color=\"transparent\"></iframe><!-- End Code --></html>



     <br>
<br>
<br>
        <td height=\"20\" class=\"style1\"><span class=\"style3\">
        <a href=\"index.php\">Home</a> |
        <a href=\"index.php?page=profile\">Manage Profile</a> | 
        <a href=\"index.php?page=gift_setup\">Manage Gift</a> | 
        $adboxallow
        <a href=\"index.php?page=promote\">Promote</a> |
        <a href=\"index.php?page=jv_invite\">Invite JV Partners</a> |
        <a href=\"index.php?page=get_gifts\">Get Gifts</a> |
        $u 
        <a href=\"index.php?page=stats\">Referal Stats</a> |
        <a href=\"{helpdeskurl}\" target=_blank>Helpdesk</a> |
        <a href=\"index.php?op=logout\">Logout</a></span></td>
        </tr>
    </table>";
	
	$main=str_replace("{sitename}",$sitename,$main);
	$main=str_replace("{helpdeskurl}",get_setting("helpdeskurl","system"),$main);
	$main=str_replace("{webmasteremail}",$webmasteremail,$main);
	$main=str_replace("{dwld}",$u,$main);
	$main=str_replace("{oto}",$oto,$main);
	
	echo $main;
}

function promote($id)
{
	$q=new DB;
	$currentdate=time();
		$startdate=get_setting("start_date","system");
		if ($currentdate<=$startdate)  { $showform = 0; } else { $showform = 1; }
	$cmember="";
	//$cmember=get_template('template_jv_home_htm');
	FFileRead("templates/jv/template.jv.promotion.tools.htm",$cmember);
	$cmember=str_replace("{buzz_email1_subject}",get_setting("buzz_email1_subject","promotion"),$cmember);
	$cmember=str_replace("{buzz_email1}",get_setting("buzz_email1","promotion"),$cmember);
	$cmember=str_replace("{buzz_email2_subject}",get_setting("buzz_email2_subject","promotion"),$cmember);
	$cmember=str_replace("{buzz_email2}",get_setting("buzz_email2","promotion"),$cmember);
	$cmember=str_replace("{promo_email1_subject}",get_setting("promo_email1_subject","promotion"),$cmember);
	$cmember=str_replace("{promo_email1}",get_setting("promo_email1","promotion"),$cmember);
	$cmember=str_replace("{promo_email2_subject}",get_setting("promo_email2_subject","promotion"),$cmember);
	$cmember=str_replace("{promo_email2}",get_setting("promo_email2","promotion"),$cmember);
	$cmember=str_replace("{promo_email3_subject}",get_setting("promo_email3_subject","promotion"),$cmember);
	$cmember=str_replace("{promo_email3}",get_setting("promo_email3","promotion"),$cmember);
	$cmember=str_replace("{promo_email4_subject}",get_setting("promo_email4_subject","promotion"),$cmember);
	$cmember=str_replace("{promo_email4}",get_setting("promo_email4","promotion"),$cmember);
	$cmember=str_replace("{promo_email5_subject}",get_setting("promo_email5_subject","promotion"),$cmember);
	$cmember=str_replace("{promo_email5}",get_setting("promo_email5","promotion"),$cmember);
	
	$cmember=str_replace("{id}",$id,$cmember);
	
$theform = NULL;

$notyet = "<p align=\"center\"><b>&nbsp;</b></p>
<hr>
<p align=\"center\"><span style=\"font-weight: 700; background-color: #FFFF00\">
<font size=\"6\">Promotion Has Not Started Yet.</font></span></p>
<p align=\"center\"><span style=\"font-weight: 700; background-color: #FFFF00\">
<font size=\"6\">You can invite JV Partners Now.</font></span></p>
<hr>
<p align=\"center\">&nbsp;</p>";


if ($showform) 
{
$cmember=str_replace("{sform}",$theform,$cmember);
}
else
{
$cmember=str_replace("{sform}",$notyet,$cmember);
}


	$query="select * from members where id='$id'";
	$q->query($query);
	$q->next_record();
	
	$cmember=str_replace("{name}",$q->f("name"),$cmember);
	$cmember=str_replace("{sitename}",site_url,$cmember);
	$cmember=str_replace("{memcommission}",get_setting("jv_comm","payment"),$cmember);
	$cmember=str_replace("{memcommission1}",get_setting("jv_comm1","payment"),$cmember);
	$cmember=str_replace("{otoprice}",get_setting("otoprice","payment"),$cmember);
	$cmember=str_replace("{otoprice1}",get_setting("oto2price","payment"),$cmember);
	$otocomm=round(get_setting("otoprice","payment")*get_setting("jv_comm","payment"),2);
	$cmember=str_replace("{otocomm}",$otocomm,$cmember);
	$otocomm1=round(get_setting("oto2price","payment")*get_setting("jv_comm1","payment"),2);
	$cmember=str_replace("{otocomm1}",$otocomm1,$cmember);
	$cmember=str_replace("{promoteurl}","http://".site_url."go/$id",$cmember);
	echo $cmember;
}

function jv_invite($id)
{
	$q=new DB;
	//$cmember=get_template('template_jv_invite_htm');
	FFileRead("templates/jv/template.jv.invite.htm",$cmember);
	$cmember=str_replace("{jv_invite_email}",get_setting("jv_invite_email","promotion"),$cmember);
	$cmember=str_replace("{id}",$id,$cmember);
	
	$query="select * from members where id='$id'";
	$q->query($query);
	
	$q->next_record();
	
	$cmember=str_replace("{name}",$q->f("name"),$cmember);
	
	$query="select * from members where aff='$id' and jv=1";
	$q->query($query);
			$points=get_setting("l1_jv","system");
	while ($q->next_record())
	{
		
		$rows.="<tr><td width=100> <a href='mailto:".$q->f("email")."'>".$q->f("email")."</a></td>
				<td width=200>".$q->f("name")." $points pt Bonus</td></tr>";
		
	}
	if ($q->nf()==0) $rows="<tr><td align=center>NONE</td></tr>";
	$cmember=str_replace("{rows}",$rows,$cmember);
	$cmember=str_replace("{l1_jv}",get_setting("l1_jv","system"),$cmember);
	$cmember=str_replace("{l1_jv_l1}",get_setting("l1_jv_l1","system"),$cmember);
	$cmember=str_replace("{l1_mem}",get_setting("l1_mem","system"),$cmember);
	$cmember=str_replace("{sitename}",site_url,$cmember);
	$cmember=str_replace("{promoteurl}","http://".site_url."go/$id/jv",$cmember);
	
	echo $cmember;
}

function profile($id)
{
	$pic_form = uploader();
	$q= new DB;
	$query="select * from members where id='$id'";
	$q->query($query);
	$q->next_record();
	FFileRead("templates/jv/template.jv.account.info.htm", $cmember);
	$cmember=str_replace("{pict}",$pic_form,$cmember);
	$cmember=str_replace("{id}",$q->f("id"),$cmember);
	$cmember=str_replace("{language}",$q->f("language"),$cmember);
	$cmember=str_replace("{email}",$q->f("email"),$cmember);
	$cmember=str_replace("{clickbank}",$q->f("clickbank"),$cmember);
	$cmember=str_replace("{paypal}",$q->f("paypal"),$cmember);
	$cmember=str_replace("{password}",Decrypt($q->f("uupassword"),NCR_KE,PK),$cmember);
	$cmember=str_replace("{max}",get_setting("max_char","system"),$cmember);
	$cmember=str_replace("{status}",$q->f("status"),$cmember);
	$cmember=str_replace("{last_log}",$q->f("last_log"),$cmember);
	$cmember=str_replace("{yyy}",$q->f("t_aff"),$cmember);
	$cmember=str_replace("{name}",$q->f("name"),$cmember);
	$cmember=str_replace("{ip}",$q->f("ip"),$cmember);
	$cmember=str_replace("{address}",$q->f("address"),$cmember);
	$cmember=str_replace("{money}",$q->f("money"),$cmember);
	if ($q->f("messenger")!="") 
		$cmember=str_replace("{messenger}","<option value=".$q->f("messenger").">".$q->f("messenger")."</option>" ,$cmember);
	$cmember=str_replace("{mes}",$q->f("mes"),$cmember);
	$cmember=str_replace("{aol}",$q->f("aol"),$cmember);
	$cmember=str_replace("{icq}",$q->f("icq"),$cmember);
	$cmember=str_replace("{yahoo}",$q->f("yahoo"),$cmember);
	$cmember=str_replace("{opt_size}",$q->f("opt_size"),$cmember);
	$cmember=str_replace("{disabled}",$disabled,$cmember);
	$cmember=str_replace("{min_payout}",$min_payout,$cmember);
	//$cmember=str_replace("{views}",$q->f("views"),$cmember);
	$cmember=str_replace("{city}",$q->f("city"),$cmember);
	$cmember=str_replace("{state}",$q->f("state"),$cmember);
	//$cmember=str_replace("{username}",$q->f("username"),$cmember);
	$cmember=str_replace("{country}",$q->f("country"),$cmember);
	$cmember=str_replace("{points}",$q->f("points"),$cmember);
	$cmember=str_replace("{reason}",$q->f("reason"),$cmember);
	$cmember=str_replace("{reff}",$html_levels,$cmember);
	if ($q->f("image")!="")
	$cmember=str_replace("{img}","<img src='".$q->f("image")."'>",$cmember);
	else  $cmember=str_replace("{img}","NO IMAGE",$cmember);
	if ($q->f("messages_enable")==1) $me1="checked"; else $me1="";
	
	$cmember=str_replace("{m}",$me1,$cmember);
	
	
	//$cmember=str_replace("{amount}",get_setting("amount"),$cmember);
	$query="select  count(*) as n from members where t_aff<".$q->f("t_aff");
	$q->query($query);
	$q->next_record();
	
	
	$query="select count(*) as n from members where aff='$id'";
	$q->query($query);
	$q->next_record();
	$cmember=str_replace("{affx}",$q->f("n"),$cmember);
	
	$q2=new DB;
	$query="select * from members where aff='$id' and jv=1";
	$q->query($query);
			$points=get_setting("l1_jv","system");
	while ($q->next_record())
	{
		
		$rows.="<tr><td width=100> <a href='mailto:".$q->f("email")."'>".$q->f("email")."</a></td>
				<td width=200>".$q->f("name")." $points pt Bonus</td></tr>";
		
	}
	if ($q->nf()==0) $rows="<tr><td align=center>NONE</td></tr>";
	$cmember=str_replace("{rows}",$rows,$cmember);

                $q3=new DB;
	$query="select * from members where aff='$id' and jv=0";
	$q->query($query);
			//$points=get_setting("l1_jv","system");
	while ($q->next_record())
	{
		
		$rowsmem.="<tr><td width=100> <a href='mailto:".$q->f("email")."'>".$q->f("email")."</a></td>
				<td width=200>".$q->f("name")." </td></tr>";
		
	}
	if ($q->nf()==0) $rowsmem="<tr><td align=center>NONE</td></tr>";
	$cmember=str_replace("{rowsmem}",$rowsmem,$cmember);
echo $cmember;
}

function homepage($id)
{
	$q=new DB;
	FFileRead("templates/jv/template.jv.home.htm",$cmember);
	$query="select * from members where id='$id'";
	$q->query($query);
	$q->next_record();

	$cmember=str_replace("{id}",$id,$cmember);
	$cmember=str_replace("{status}",$q->f("status"),$cmember);
	$cmember=str_replace("{reason}",$q->f("reason"),$cmember);
	$cmember=str_replace("{start_date}",date("l F dS Y \@ h:i:s A T", stripslashes(get_setting("start_date","system"))),$cmember);
	$cmember=str_replace("{end_date}",date("l F dS Y \@ h:i:s A T", stripslashes(get_setting("end_date","system"))),$cmember);
	$cmember=str_replace("{sitename}",site_title,$cmember);

	echo "<center>$cmember</center>";
}

function gift_setup($id)
{
	$q=new DB;
	$q1=new DB;
	$q2=new DB;
	$q3=new DB;
	$pic_form = uploader();
	FFileRead("templates/jv/template.jv.gift.setup.htm",$cmember);
	$query="select * from members where id='$id'";
	$q->query($query);
	$q->next_record();

	$cmember=str_replace("{id}",$id,$cmember);
	$cmember=str_replace("{name}",$q->f("name"),$cmember);
	$cmember=str_replace("{img_form}",$pic_form,$cmember);
	$cmember=str_replace("{status}",$q->f("status"),$cmember);
	$cmember=str_replace("{reason}",$q->f("reason"),$cmember);
	$cmember=str_replace("{yyy}",$q->f("t_aff"),$cmember);
	$query="select count(*) as n from members where aff='$id'";
	$q1->query($query);
	$q1->next_record();
	$cmember=str_replace("{affx}",$q1->f("n"),$cmember);
	$query="select * from products where member_id='$id'";
	$q2->query($query);
	$q2->next_record();
	$cmember=str_replace("{pname}",$q2->f("name"),$cmember);
	$cmember=str_replace("{desc}",$q2->f("descr"),$cmember);
	$cmember=str_replace("{ty_url}",$q2->f("ty_url"),$cmember);
	$cmember=str_replace("{dd_url}",$q2->f("dd_url"),$cmember);
	$cmember=str_replace("{image}",$q2->f("image"),$cmember);
	$cmember=str_replace("{freead}",$q2->f("freead"),$cmember);
	$cmember=str_replace("{salespage}",$q2->f("salespage"),$cmember);
	if ($q2->f("image")!="")
	$cmember=str_replace("{img}","<img src='".$q2->f("image")."'>",$cmember);
	else  $cmember=str_replace("{img}","NO IMAGE",$cmember);
	$query="select  count(*) as n1 from members where t_aff<".$q->f("t_aff");
	$q3->query($query);
	$q3->next_record();
	$cmember=str_replace("{rank}",$q3->f("n1")+1,$cmember);
	$cmember=str_replace("{max}",get_setting("max_char","system"),$cmember);
	
	
	
	
	echo $cmember;
}

function stats($id)
{
	//jv partners
	FFileRead("templates/jv/template.jv.stats.htm",$content);
	$q8=new DB;
	$query = "SELECT id,name,email FROM members WHERE level=2 AND aff=$id ORDER BY id ASC";
	 //jvname and hits
	 $q8->query($query);
	 $jvcount = $q8->nf();
	 $flag = 0;
	 $points=get_setting("l1_jv","system");
	 while ($q8->next_record()) {
	 if ($flag == 1) {
          $color="odd";
       }
       if ($flag == 0) {
          $color="even";
       }
       $flag++;
       if ($flag > 1) {
       $flag = 0;
       }
       $jvtable.="<tr class=\"$color\">
       <td style=\"width: 150px\">".$q8->f("name")."</td>
       <td>".$q8->f("email")."</td></tr>";
	 }
	 //members
	 $q9=new DB;
	$query = "SELECT id,name,email FROM members WHERE level=3 AND aff=$id ORDER BY id ASC";
	 //jvname and hits
	 $q9->query($query);
	 $memcount = $q9->nf();
	 $flag = 0;
	 //$points=get_setting("l1_jv","system");
	 while ($q9->next_record()) {
	 if ($flag == 1) {
          $color="odd";
       }
       if ($flag == 0) {
          $color="even";
       }
       $flag++;
       if ($flag > 1) {
       $flag = 0;
       }
       $memtable.="<tr class=\"$color\">
       <td style=\"width: 150px\">".$q9->f("name")."</td>
       <td>".$q9->f("email")."</td></tr>";
	 }
	 
	 
	 $content=str_replace("{jvtable}",$jvtable,$content);
	 $content=str_replace("{jvcount}",$jvcount,$content);
	 $content=str_replace("{memtable}",$memtable,$content);
	 $content=str_replace("{memcount}",$memcount,$content);
	 echo $content;
}
	


}
?>

EDIT: Compare the scripts and see what I mean by escape " .

hi yep silly me i had to add forward slashes before "'s

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.