Alexhoward Posted April 9, 2009 Share Posted April 9, 2009 Good evening! I've created a content mangement system for my website. This allows me to change all the text from the backend using a rich text editor. The code inserts the formatted text into a MySQL table with all the HTML tags, I then echo this on the front end. Problem is, on some pages i need to use data either posted from a form, or pulled from a different table. i.e. a name attached to the users login via email. so to pull out the content i'm using: simplfied... <?php $con = mysql_connect($host, $db, $pass) or die ("Apologies we are experiencing technical difficulties") ; mysql_select_db($db) or die ("Apologies we are experiencing technical difficulties") ; $query = mysql_query("SELECT * FROM table WHERE page = x") ; while($row = mysql_fetch_array($query, MYSQL_ASSOC)) { $content = $row['text'] ; } echo $content ; ?> however if i was echoing this manually i might put: <?php echo "Hello ".$full_name.", Welcome to my website..." ; ?> So my question is... is there a way to input variables into the rich text editor so that they display a result on the front end..? Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/153393-content-management-problem-any-ideas/ Share on other sites More sharing options...
herghost Posted April 9, 2009 Share Posted April 9, 2009 Why dont you store this type of data in a session? then to call it you can just echo that session Link to comment https://forums.phpfreaks.com/topic/153393-content-management-problem-any-ideas/#findComment-805904 Share on other sites More sharing options...
Alexhoward Posted April 9, 2009 Author Share Posted April 9, 2009 Hi, thanks for the reply. Well... I'm actually pulling a bit of data. page title, description, keywords, etc... but i can't echo anything... it will just output as text Link to comment https://forums.phpfreaks.com/topic/153393-content-management-problem-any-ideas/#findComment-805915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.