Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old January 21st, 2003, 10:16 AM
TSchustek TSchustek is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Gütersloh, NRW, Germany
Posts: 5 TSchustek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
HTML-Code and PHP-Code in a MEMO-Field

Hi!

I have a mySQL-Table with a Longtext-Field where I post HTML-Code in. I show the content of the Longtext-Field in a file called index.php f.e. with <?PHP echo $var; ?>

If there is normal HTML-Code in $var it is no problem. But if there is php-code in $var I have difficulties - nothing happens. Is there any idea, what kind of syntax I have to use in $var, to run php-code in my browser (index.php)?

Reply With Quote
  #2  
Old January 21st, 2003, 10:33 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: HTML-Code and PHP-Code in a MEMO-Field

Try using eval(), as in
php Code:
Original - php Code
  1.  
  2. eval("?>".$var);

You need to add the PHP closing tag at the beginning, otherwise the evaluation will start in PHP mode (and not in HTML, as is the case with files), which is probably not what you want.

I hope you don't allow visitors to enter the code, though - it is EXTREMELY dangerous...

Reply With Quote
  #3  
Old January 21st, 2003, 10:44 AM
TSchustek TSchustek is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Gütersloh, NRW, Germany
Posts: 5 TSchustek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: HTML-Code and PHP-Code in a MEMO-Field

Thank you very much! It works very fine!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > HTML-Code and PHP-Code in a MEMO-Field


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT