Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,059 members, 7,956,952 topics. Date: Monday, 23 September 2024 at 11:55 PM |
Nairaland Forum / Science/Technology / Webmasters / Tutorial On: How To Build Php & Mysql Cms Website From Scratch (4116 Views)
Php/mysql(cms) Developer Working With Zend Framework Wanted / Convert Static Website To Cms Website / If You Can Design A Cms Website Like Alibaba.com Come In. (2) (3) (4)
Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 3:01pm On Dec 30, 2014 |
in this lesson which is going to be very in-depth and i am going to go really very slow and we are going to do raw data management systems from scratch which are equivalent to content management systems. They are systems that you can create, or you can download template system and use to give to clients or use for yourself to have a dynamic PHP and MySQL Website. That is what both WordPress and Joomla are, they are dynamic PHP and MySQL Website and what they do is that they store data of the sites essentially in a MySQl database and PHP interacts with that MySQL database to render all the pages and the menus. I will take you through starting the whole system from scratch, building the MySQL database and basically where you can hand it over to a client. In this tutorial I am going to be working in PHPMyAdmin. This system is suited for people that enjoy creating their system from scratch and ideal for ecommerce or deep data indexing systems, on or off the Web. What We Will Need 1. Basic HTML, CSS, PHP, and MySQL Knowledge, and a HTML/Text Editor 2. Online Live Server that Processes PHP and is MySQL Ready, Equipped With PHPMyAdmin I recommended an online server rather than installing and setting up WAMP, LAMP, etc. If you have it running already use it, but if you have not set that up before don't even try it. To use an online server, go online and get a domain and hosting that is PHP & MySQL ready and you will be able to access PHPMyAdmin from your Control Panel (cPanel). If you are running an online server you will also need: 3. Good FTP Software tha Has Folder Creation and File Permissions Control (FileZilla) 4. Free WYSIWYG Text Editor (Preferably JavaScript Based) What If I Get Stuck or Need Assistance? 1. Try Forums like nairaland, Although NO Help Guarantees In a Free Forum 2. Or Hire Guyson TO Help You Produce The System 1 Like |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by mojeed4(m): 3:02pm On Dec 30, 2014 |
. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 3:06pm On Dec 30, 2014 |
Try not to ask people to help build your site for free. Pay attention best you can build it yourself WordPress and Joomla are much more powerful that what we are going to be building. This will give you insight into how to get started with your own system to offer your clients and have total control of design and programming |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 3:22pm On Dec 30, 2014 |
STEPS 1. Creating MySQL Database on your server I am going to skip this step coz I believe we know how to create a MySQL Database on your server. Or you can read the tutorial at http://askguyson.com/creating-mysql-database-on-your-server/ 2. Connecting to your MySQL Database I will also skip this step, read at http://askguyson.com/connecting-to-your-mysql-database/ 3. Creating a Main Project file Create a folder where you are going to store the files for this project. You can create it on your desktop or in www directory for those of you working with a localhost server |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 3:38pm On Dec 30, 2014 |
Name the folder: MyCustomCMS and create a sub-folder named scripts inside the MyCustomCMS folder. 4. Building the index page In this tutorial I'm not going to focus on designing, rather I will be focusing on functionality (development) Create and index page for rendering all your Pages/Post. The benefit of CMS is that you don't have to create a static html or php page for every Page/Post. All the Pages/Post will be displayed on your single index.php page. Create an index.php page like the following
|
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 3:52pm On Dec 30, 2014 |
You can use HTML table to create the layout using the 1:3:1 format. Or just use HTML & CSS to create the layout for the template. Mine was created using HTML & CSS. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 4:04pm On Dec 30, 2014 |
When you are done with creating the template, we will move on to the next step |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by lambvard: 6:40pm On Dec 30, 2014 |
Am with you |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 8:03pm On Dec 30, 2014 |
5. Create tables in the Database you created in Step 1 For this project we are going to be creating two(2) tables. FIRST TABLE Name: pages Number of fields: 10 With the following fields: id, pagetitle, linklabel, pagebody, pageorder, showing, keywords, description, lastmodified, extra Set the id, to auto increment and primary key, pagetitle varchar 255, linklabel varchar 255, pagebody text, pageorder int 11, showing enuum '0', '1' default 1, keywords varchar 255, description varchar 255, lastmodified date, and extra varchar 255. We are now done with the first table. Now we are going to move on to creating the second table |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 8:35pm On Dec 30, 2014 |
To get a feel of what we are about to build, you can view the demo online at http://www.demo.askguyson.com on your desktop browser. It is ugly but it works perfectly well |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by DONOCSO(m): 7:12am On Dec 31, 2014 |
Nice Job Boss |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by debeginin(m): 11:35am On Dec 31, 2014 |
Guyson:Pls boss I don't get d 1:3:1 format,cld U pls enlighten me.Tnx. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 11:37am On Dec 31, 2014 |
Creating the Second Table Table Name: modules Number of fields: 4 With the following fields: id name modulebody showing Set the id to auto increment and make it the primary key, name varchar (255), modulebody text, and showing enum ‘0’,’1′ and default = 1. we are now done with the second table. The first and second table should look like this
|
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 1:54pm On Dec 31, 2014 |
debeginin: I meant one table data for the first table row, three table data for the second row, and one table data for the last row. The following code should do it <Table width=100%> <Tr><td width=100%><h1>Website Name</h1></td></tr> <Tr><td width=15%>Menu</td><td width=70%>Body</td> <Td width=15%>CustomModule</td></tr> <Tr><td width=100% align=center>Footer</td></tr> </table> Copy and paste the code in your text editor (like Notepad) |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by debeginin(m): 2:23pm On Dec 31, 2014 |
Guyson:OK.Got it.Tnx boss. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 6:07pm On Dec 31, 2014 |
Now it is time for us to insert data in the database and call the data to be displayed on our index.php page Insert the following data into the pages database Pagetitle = Home page of my website Linkabel = Home Pagebody = welcome to my home page Pageorder = 1 Showing = 1 (select 1 from the radio button) Keywords = how to buld dynamic website Description = blah blah Lastmodified = "click the button to select the date" Extra = leave it blank That is for creating the the first row (each rowholds the content of one page/post), then when that row is called on the index.php page it will display "home" as the link on the left side of the page, it will display "welcome to my home page" in the middle column whenever the home link is clicked, it will display "home page of my website" as the title of the page. You can insert more rows to create more pages/post (eg: for about page, contact page, or whatever page/post you want) but make show you increment the pageorder manually After that we would move on to inserting data in the modules table |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by debeginin(m): 3:47pm On Jan 01, 2015 |
Following boss.More grease to Ur elbow. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 7:15pm On Jan 01, 2015 |
Insert content data into modules table FIRST ROW Id = 1 Name = footer Modulebody = (c) copyright BlahBlah Designed by YOU This row will bring out a footer at the bottom of the page FOR SECOND ROW Id = 2 Name = custom1 Modulebody = This is my custom module...I can put any HTML data here With this row you can put any HTML data to be displayed on the right hand side of your index page. As you can see on the demo page at http://www.demo.askguyson.com I created a login form on the right hand of my index page. If you want to put a form on yours, erase "this is my custom module..I can put any HTML data here" and put your form code Now, I will give you the source code, copy and paste it at the top of your index page. The source code is for connecting to database and retrieving content from the database tables. |
Re: Tutorial On: How To Build Php & Mysql Cms Website From Scratch by Guyson(m): 5:17pm On Jan 02, 2015 |
I might not post everything here, you can follow up the tutorials at: http://askguyson.com/how-to-build-php-mysql-cms-website-part1/ 1 Like |
(1) (Reply)
Who Gat Link To Download SEVIDA Blogger Template / Efficient Strategy To Have Good Links / 4 Things Bloggers Should Learn From Journalists
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 54 |