FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to "quote code" in PHP?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to "quote code" in PHP? [message #174049 is a reply to message #174047] Fri, 20 May 2011 10:21 Go to previous messageGo to previous message
Jeff North is currently offline  Jeff North
Messages: 58
Registered: November 2010
Karma:
Member
On Fri, 20 May 2011 10:54:07 +0200, in comp.lang.php Michael Fesser
<netizen(at)gmx(dot)de>
<iqact6pduh5u0vduj6i9gttss0on477hr4(at)mfesser(dot)de> wrote:

> | .oO(Mentalguy2k8)
> |
> | >I'm getting in a mess here... I've written the page where the user inputs
> | >the URL into a text box (as "url"), which passes the URL to the results page
> | >as follows:
> | >
> | >Cut and paste this link: <?php echo $_POST["url"]; ?>
> | >
> | >which will display the text "cut and paste this link" along with the URL
> | >that they entered. I need to add the <a href and the closing </a> around the
> | >URL, without spaces, so that the user can copy the entire line and paste it
> | >into the forum box.
> |
> | <?php echo htmlspecialchars("<a href='{$_POST['url']}'></a>");?>
> |
> | Something like that.
> |
> | Micha
So you get some text to show the link you will need:
<?php echo htmlspecialchars("<a
href='{$_POST['url']}'>{$_POST['url']}</a>");?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Regular Expressions
Next Topic: php5-xdebug backported to squeeze from SVN 2.2.0 with trigger functionality
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 12 22:47:13 GMT 2024

Total time taken to generate the page: 0.04085 seconds