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 #174050 is a reply to message #174049] Fri, 20 May 2011 16:21 Go to previous message
Mentalguy2k8 is currently offline  Mentalguy2k8
Messages: 3
Registered: May 2011
Karma:
Junior Member
"Jeff North" <jnorthau(at)yahoo(dot)com(dot)au> wrote in message
news:p3gct69n00naeh50sk4f7grl2t87a6g5qg(at)4ax(dot)com...
> 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>");?>

Thanks a lot everyone, very useful and I got it working. Very much
appreciated, thanks again.
[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: Wed Nov 27 00:30:50 GMT 2024

Total time taken to generate the page: 0.04551 seconds