WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2004, 01:18 PM
WebProWorld New Member
 

Join Date: Mar 2004
Location: Europe
Posts: 1
Antinaris RepRank 0
Default Textarea and PHP.

I want to know if it's possible to show php code in a textarea without the code being interpreted and then stock it in a MySQL table.
thanks
Reply With Quote
  #2 (permalink)  
Old 04-02-2004, 02:32 PM
WebProWorld Pro
 

Join Date: Jul 2003
Location: New Jersey, U.S.
Posts: 293
jdiben RepRank 0
Default

If you dont want the code to be seen as code use
Code:
<?php
code....
?>
instead of
Code:
<?php
code....
?>
The code will be seen as text.
Reply With Quote
  #3 (permalink)  
Old 04-04-2004, 06:25 PM
Elite Skills's Avatar
WebProWorld Veteran
 

Join Date: Oct 2003
Location: Texas
Posts: 300
Elite Skills RepRank 0
Default

go to the php manual and make yourself a parser for if you have a lot of code and do it repeatedly. There's a function to convert html entities automatically so you can just copy and paste once done.
__________________
[ Webmaster Education ] [ Webmaster Articles ] [ Poetry
Reply With Quote
  #4 (permalink)  
Old 04-05-2004, 06:18 PM
swstyles's Avatar
WebProWorld Pro
 

Join Date: Aug 2003
Location: Phoenix, AZ
Posts: 167
swstyles RepRank 0
Default

the asp equivalent is server.htmlencode()
__________________
Daniel M: South West Styles/STEELid
daniel@steelid.com
http://www.steelid.com
http://www.thephototool.com
Reply With Quote
  #5 (permalink)  
Old 04-06-2004, 12:35 PM
Deep13's Avatar
WebProWorld Veteran
 

Join Date: Dec 2003
Location: India
Posts: 306
Deep13 RepRank 0
Default

using htmlentities() function shall help you out...

usage

htmlentities($VariableName)

regards
Deep
Reply With Quote
  #6 (permalink)  
Old 04-06-2004, 04:37 PM
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Spain
Posts: 335
computergenius RepRank 1
Default Just leave the <? out

I can't see what your problem is - surely, all you need to do is leave the <? and ?> out:
<textarea name="task" cols="60" rows="15">
echo "Hello World";
</textarea>
__________________
Pete Clark
Advertise events locally in Spain for free - http://hotcosta.com/events.php
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0