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 #174047 is a reply to message #174046] Fri, 20 May 2011 08:54 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.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
[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:44:15 GMT 2024

Total time taken to generate the page: 0.05176 seconds