Results 1 to 2 of 2

Thread: Href Target

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    266

    Question Href Target

    Hi,

    I have a problem to display a .php page in a frame. The following is the code of mine. Please point out error because of which it is not displaying in the frame, but in a separate window.

    PHP Code:
    <html>
    <!-- 
    main.php -->
    <
    head>
    <
    title>WERLIVE</title>
    </
    head>

    <
    frameset rows="120,*" framespacing="0" border="0" frameborder="0">
      <
    frame name="header" scrolling="no" src="banner.php">
      <
    frame name="main" scrolling="auto" src="display.php">
      <
    noframes>
      
      <
    body>

      </
    body>
      
      </
    noframes>
    </
    frameset>

    </
    html

    PHP Code:
    <?php

    //banner.php

    $banner=array(
                      
    0=>"1_Mysticboard_horos_728_90.jpg",
                      
    1=>"2_Mysticboard_psych_728_90.jpg",
                      
    2=>"3_Mysticboard_tarot_728_90.jpg"
                
    );

    $link=array(
                      
    0=>"http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBast&gotopage=hostlist.asp?cat=2&fatherid=2",
                      
    1=>"http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBpsy&gotopage=hostlist.asp?cat=2&fatherid=2",
                      
    2=>"http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBtar&gotopage=hostlist.asp?cat=2&fatherid=2"
                
    );

    $hyperlink="";

    shuffle($banner);

    if(
    $banner[0]=="1_Mysticboard_horos_728_90.jpg")
    {
          
    $hyperlink="http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBast&gotopage=hostlist.asp?cat=2&fatherid=2";
    }
    elseif(
    $banner[0]=="2_Mysticboard_psych_728_90.jpg")
    {
          
    $hyperlink="http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBpsy&gotopage=hostlist.asp?cat=2&fatherid=2";
    }
    elseif(
    $banner[0]=="3_Mysticboard_tarot_728_90.jpg")
    {
          
    $hyperlink="http://weRlive.com/wmaster.asp?WID=124176811875&linkid=1039&promotioncode=MBtar&gotopage=hostlist.asp?cat=2&fatherid=2";
    }

    //for($i=0;$i<=count($banner);$i++)
    //{
    //      print $banner[$i]."<br>";
    //}

    ?>

    <html>

    <head>
    <title>WERLIVE</title>
    </head>

    <body>
    <center>

    <a href="<?php echo $hyperlink?>" target="main"><?php echo "<img src='/$banner[0]'>"?></a>

    </center>
    </body>

    </html>

    Thank you in advance.

    By the way, can you please tell me what is the string to post PHP codes with color syntax in VBForums ?
    Last edited by systech44; Jan 4th, 2007 at 01:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width