How to create a CMS with PHP // Part 2 – Getting rows from our database
In this series I’ll show you how to make a CMS with PHP using modern techniques using Classes and Functions to get the best result on your page.
Duration : 0:10:37
In this series I’ll show you how to make a CMS with PHP using modern techniques using Classes and Functions to get the best result on your page.
Duration : 0:10:37
Categories: Content Management Tags: blog, cast, cms, content, create, design, domain, free, how, make, management, PHP, screen, screencast, system, to, tutorial, using, video, website, with
Your Site Sample is Stephen Fry proof thanks to caching by WP Super Cache
i get this error:
…
i get this error:
Parse error: syntax error, unexpected T_VARIABLE in [---my directory---] on line 9
Your way is fine …
Your way is fine however, create a constructor that takes username,password, database name and host. Once you instantiate the class $obj=new ModernCMS(“username”,”password”,”host”,”dbName”);
In the constructor you can set the var at the top and call the function connect();
Your example is bleeding from the class. You want to try to encapsulate.
In another note Good job !
Did you take a …
Did you take a summer class or go to school to learn some of this?
@jorgerko15 tyvm!
@jorgerko15 tyvm!
@G15BT add echo …
@G15BT add echo between <?php (here) $obj
@ivolol if they …
@ivolol if they can’t understand this then MVC will really lose them…lol
Thank u so much for …
Thank u so much for this great tutorial…but now im stuck!
me too …I have followed this video,and in my index.php i visualize:
get_content()”) ?>
what’s the problem?
i read the comments below…and i realize that im not the first one with this problem.
If you can help me, i really apprecciated! greetings from italy!
I have followed …
I have followed this, all i get in my index.php is:
get_content()”) ?>
Any solutions?
Thanks
hey, when i add the …
hey, when i add the code $obj->host the -> part stops the code and it wont work
I think that this …
I think that this is a great series. The only thing is that prefacing the examples you say that you aren’t going to go into great detail, because people can ask around. I think that the purpose of doing a tutorial is to explain, and go into detail. Otherwise why do it. For example, tutvid does GREAT tutorials on all types of things, and he goes into great detail, which is why so many people watch his stuff. If he did CMS I would be there. People want to learn.
p.s, the part im at …
p.s, the part im at is around 6.30, when i try to test the connection i get the aformentioned error
Hey, i’m stuck …
Hey, i’m stuck roughly half way through this video. I’ve finished the first complete part of cms_class.php and have everything down to a T, ive checked every piece of punctuation against the lines in the video and still i get:
“Parse error: syntax error, unexpected ‘)’ in /Applications/XAMPP/xamppfiles/htdocs/tensai_cms/_class/cms_class.php on line 13″
I know roughly what this error means and have checked over all brackets etc and its exactly the same! What am I doing wrong?
is there anyone …
is there anyone here that can help me with a database that can support 10000 people and there login info. and points they can earn points and redeem them for prizes anyone who can help me and wants to get in to this website with me message me! plz
I logged into my …
I logged into my other account, sorry if there was any confusion.
MVCs are great but …
MVCs are great but it is fairly difficult to build a good MVC from scratch. One of the reasons for making this series was to introduce classes in PHP so I could create another series on building an MVC similar to Code Igniter. My problem was trying to link a database class and pull results in my view file from the controller.
This still isn’t …
This still isn’t really modern… most new stuff is following the MVC model these days.
I have a online …
I have a online payed for Linux server.
check your database …
check your database password or privileges. or restart apache. If this problem continues, try to remove and reinstall xampp or wamp.
you can save the tables you already created by using ”export” and then once xampp is reinstalled, create a new database and ”import” the tables back into it…and bingo fresh start.
I get this :
…
I get this :
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘root’@'localhost’ (using password: NO) in /home/simplit/public_html/tester/_class/cms_class.php on line 11
Access denied for user ‘root’@'localhost’ (using password: NO)
Great series mate, …
Great series mate, really helping me start off in PHP. (Y)
Hey great series, I …
Hey great series, I am having a problem. I get this:
get_content()?>
where it should display the content from the database.
Got any idea?
-FireDart
nicely done doggie
nicely done doggie
This CMS series is …
This CMS series is excellent! I am learning alot very quickly! You should consider getting some of your work on Nettuts, you have good quality tuts!
Great!
Great!
excellent vid, …
excellent vid, thanks for recommending this to me. i learnt a lot. : D