I need a PHP code that replaces itself (like all PHP does, I believe) with what I have in the address bar (?id=). I know the include code, and that doesn't work, because that includes files. I want to have ?id=http://www.mysite.com/, and have it parse <!-- m --><a class="postlink" href="http://www.mysite.com/">http://www.mysite.com/</a><!-- m --> where the PHP code is. Does anyone know how to do this?
Darn, I didn't see there was a forum for PHP and such here, and deleting the thread doesn't work... Can anyone please move this?this really should've been posted in the PHP Programming section
but... $_GET['id'] will get the info from the location barIt didn't work... Here is the code:
<HTML>
<HEAD>
<TITLE>Alqualondë</TITLE>
</HEAD>
<FRAMESET ROWS="39,*" BORDER="0" FRAMESPACING="0" FRAMEBORDER="NO">
<FRAME style="border-bottom:1px solid #000;" SRC=http://www.htmlforums.com/archive/index.php/"del1.html" MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE NAME="links" scrolling="no">
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">
</FRAMESET>
<NOFRAMES>
<BODY>
<CENTER>
<TABLE WIDTH=400 BORDER=2>
<TR>
<TD>
<font face="Verdana" size="+4" color="red">For ?se denne siden m?browseren din st榇梩e frames.</font>
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</NOFRAMES>
</HTML>
And this is what happens:
<!-- m --><a class="postlink" href="http://alqua.tolkiens.net/frames.php?id=http://www.tolkiens.net/are">http://alqua.tolkiens.net/frames.php?id ... ns.net/are</a><!-- m --> you missing ; - <?php $_GET['id'];?>
i'm not sure... i usually use <?=$_GET['id']?> and it doesn't need any!?Thankee, now it works (I used <?=$_GET['id']?> like you did instead of <?php $..., and it worked!).you forgot to echo it to the screen, using echo or = is the samething
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php echo $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">Originally posted by scoutt
you forgot to echo it to the screen, using echo or = is the samething
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php echo $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">
that's it!!! i knew it was missing something... just couldn't remember what!!?
way to go scoutt
Darn, I didn't see there was a forum for PHP and such here, and deleting the thread doesn't work... Can anyone please move this?this really should've been posted in the PHP Programming section
but... $_GET['id'] will get the info from the location barIt didn't work... Here is the code:
<HTML>
<HEAD>
<TITLE>Alqualondë</TITLE>
</HEAD>
<FRAMESET ROWS="39,*" BORDER="0" FRAMESPACING="0" FRAMEBORDER="NO">
<FRAME style="border-bottom:1px solid #000;" SRC=http://www.htmlforums.com/archive/index.php/"del1.html" MARGINWIDTH="0" MARGINHEIGHT="0" NORESIZE NAME="links" scrolling="no">
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">
</FRAMESET>
<NOFRAMES>
<BODY>
<CENTER>
<TABLE WIDTH=400 BORDER=2>
<TR>
<TD>
<font face="Verdana" size="+4" color="red">For ?se denne siden m?browseren din st榇梩e frames.</font>
</TD>
</TR>
</TABLE>
</CENTER>
</BODY>
</NOFRAMES>
</HTML>
And this is what happens:
<!-- m --><a class="postlink" href="http://alqua.tolkiens.net/frames.php?id=http://www.tolkiens.net/are">http://alqua.tolkiens.net/frames.php?id ... ns.net/are</a><!-- m --> you missing ; - <?php $_GET['id'];?>
i'm not sure... i usually use <?=$_GET['id']?> and it doesn't need any!?Thankee, now it works (I used <?=$_GET['id']?> like you did instead of <?php $..., and it worked!).you forgot to echo it to the screen, using echo or = is the samething
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php echo $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">Originally posted by scoutt
you forgot to echo it to the screen, using echo or = is the samething
<FRAME SRC=http://www.htmlforums.com/archive/index.php/"<?php echo $_GET['id'] ?>" MARGINWIDTH="2" MARGINHEIGHT="2" NAME="content">
that's it!!! i knew it was missing something... just couldn't remember what!!?
way to go scoutt