Intranet Journal

Go Back   IT Management Forum > Intranet Journal

Intranet Journal The new discussion forum for Intranet Journal readers. Leave comments and questions for IJ authors. Suggest story ideas and provide feedback.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-15-2009, 12:36 PM
krisahil krisahil is offline
Registered User
 
Join Date: Jan 2009
Posts: 4
process php inside of echoed $_POST variable

Hi all,
I'm using Peter's CMS tutorial for my own CMS, but I'm stuck at one point. I want to use php code inside my articles. For example, let's say one 'thearticle' field in 'cmsarticles' contains:

Code:
<p>Does php process below?</p>

<?php
$meee = 'hello world';
echo $meee;
?>
But when I echo the field 'thearticle' using:
Code:
<?php echo $row['thearticle'] ?>
The html output only produces "Does php process below?". Not "hello world." Any ideas? Thanks so much!

-Chris
Reply With Quote
  #2 (permalink)  
Old 02-08-2009, 03:26 PM
krisahil krisahil is offline
Registered User
 
Join Date: Jan 2009
Posts: 4
Hello?

Bump?
Reply With Quote
  #3 (permalink)  
Old 03-21-2009, 07:59 PM
FaT3oYCG FaT3oYCG is offline
Registered User
 
Join Date: Jan 2009
Posts: 11
well it might have something to do with the fact that you are using 2 sets of php tags which will be conflicting aswell as the fact that your code is wrong e.g.

by using ur code the actual page code generated would be
Code:
<?php echo
<p>Does php process below?</p>

<?php
$meee = 'hello world';
echo $meee;
?>
?>
i dont think you will be able to include php code in your articles unless you code arround it as you are echoing the artice content from inside a php function itself unless maybe its because u missed the semicolon off the end of the echo for the article, also use brackets with the echo command it is better practice i.e.
Code:
echo('some stuff to echo');

Last edited by FaT3oYCG; 03-21-2009 at 08:01 PM.
Reply With Quote
Reply

Bookmarks

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

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




All times are GMT -5. The time now is 08:59 AM.





Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0