You are here: Templates stored in database « PHP Programming Language « IT news, forums, messages
Templates stored in database

Posted by Ben Allen on 05/28/06 19:13

Hi,
I have a form where a user can enter different feild, for simplicities sake,
say a 'To:', 'From' and 'Message' feild. The can select a 'template' from
the databse, each one has different layouts, images etc, and is sotred as
HTML code in the mySql. My question is how do I insert the vairables into
the correct places in the template? I realise if it was hard-coded I could
use something like:

echo "To:". $to. "<br><br>". $message. "<br><br>From:". $from;

etc, although this is simplified alot and the ones int databse contain
images, tables, css etc. I don't really want to hardcode them using IF
statements as I want it to be easy to add new 'templates'.


Thanks
Ben

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация