foevah Posted June 11, 2008 Share Posted June 11, 2008 Hi everyone, I would like to a very simple CMS. Simple as in: The ability to edit one page - not a whole site. The content of the site will have main image which will be uploaded, resized and put into the database. This will then be displayed on the web page. The text in the content will also be editable via a CMS. This sounds simple but yet I have no idea on how to do this.. Please can someone help me achieve this? Are there any online tutorials that teach this 'simple' CMS or could someone here help me step by step on how to do this? Quote Link to comment Share on other sites More sharing options...
slawrence10 Posted June 11, 2008 Share Posted June 11, 2008 I gather you have knowledge of databases already as you've mentioned them. If you create a simple table for the page you want to be editable with fields for each piece of editable content e.g image1, title, body text Then create a record within this table with the information defined. You can then create a form in PHP, that gets this record from the table, then when you submit the form it simply updates the record. This would be a start if you understand how to do that...then it would just remain to secure the page behind a login which i;m sure there are numerous tutorials on the web for. You want to look at using MySQL with PHP, possibly with the aid of PHPMyAdmin to simplify creating the table and records. Regards, Scott Quote Link to comment Share on other sites More sharing options...
rhock_95 Posted June 11, 2008 Share Posted June 11, 2008 just a suggestion... ... if I was starting from scratch I would look at using CSS for layout etc rather than using tables...since it's only one page it should not be too much trouble to test on all the popular browsers and once it's done the content is easy to edit and your site/code should be easy to validate.... Quote Link to comment Share on other sites More sharing options...
foevah Posted June 12, 2008 Author Share Posted June 12, 2008 slawrence10 > That makes perfect sense to me. Thanks for breaking it down. I do have some knowledge of MySQL databases and some PHP knowledge. Once I have created the database table and added all the records for the main image, content, title ect.. I then need to echo this data out onto the web page. I also need to have forms for each record which updates the database entries if the users edits and submits the form.. Question is how can I echo data into a form (text area?) and then when the user submits the form it updates the records in the database? This sounds hard to me.. Are there any tutorials on this? I did a quick google search for 'php form text area echo' / other variations and nothing seems to appear. Is there a known saying for what I am trying to search for? rhock_95 > course im using see and no tables.. I think you got confused when slawrance10 said table as in a database table.. Quote Link to comment Share on other sites More sharing options...
traknet Posted June 12, 2008 Share Posted June 12, 2008 I would advise going through a good beginners book such as Sam's Teach Yourself PHP/MYSQL in 24 hours - it will give you a reasonable understanding of PHP/MYSQL and you will learn everything you need to do this through practical examples. You can skim the early stuff and get to the database part quickly. Quote Link to comment Share on other sites More sharing options...
foevah Posted June 13, 2008 Author Share Posted June 13, 2008 Question is how can I echo data into a form (text area?) and then when the user submits the form it updates the records in the database? This sounds hard to me.. Are there any tutorials on this? I did a quick google search for 'php form text area echo' / other variations and nothing seems to appear. Is there a known saying for what I am trying to search for? Quote Link to comment Share on other sites More sharing options...
Minase Posted June 13, 2008 Share Posted June 13, 2008 actually is easy first make a query that select what you need from DB,then echo it using <?=$your_variable_name?> or <?php echo $variable_name; ?> Quote Link to comment Share on other sites More sharing options...
foevah Posted July 7, 2008 Author Share Posted July 7, 2008 actually is easy first make a query that select what you need from DB,then echo it using <?=$your_variable_name?> or <?php echo $variable_name; ?> Ok I have some PHP that gets data the database contact_table: <?php $query = "SELECT name, subject, message FROM contact_table"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row['name']} <br>" . "Subject : {$row['subject']} <br>" . "Message : {$row['message']} <br><br>"; } ?> How do I echo this info using <?php echo $variable_name; ?> ? Quote Link to comment Share on other sites More sharing options...
foevah Posted July 8, 2008 Author Share Posted July 8, 2008 anyone? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.