Part 3: How to Build PHP and MySQL CMS Website Software

18 04 2011

In this part of the lesson we learn how to script out our magic index page to be smart enough to display all of the data in the system, and all pages. Source Files – http://www.developphp.com
Video Rating: 4 / 5

This is a tutorial showing you how to easily make a wobble bassline using Ableton and it’s built in instrument ‘Operator’! There are many methods of creating a dubstep bassline but in this video I show you the method that I find the simplest. Please remember to subscribe :] Link for project file :removed, thanks to people ripping it off as their own on youtube! These tutorials are donationware..meaning it is now possible to donate if you find it helpful. :] If you wish do so…its easy! Just click the paypal icon on my website and choose how much you would like to donate. All contributions for these tutorials are much appreciated! 😀 My Website-ish thing… http://www.eartrash.com To get some awesome samples for your productions go here… http Follow me on twitter? http://www.twitter.com Still use Myspace??? http://www.myspace.com


Actions

Information

50 responses

18 04 2011
Whisperingonthewind

Hi OB1 AKA Adam, I could not get part of the code to work, it needed isset, works a treat now woop at last. ;~)
if (!isset($_GET[‘pid’])){
$pageid=’1′;

Great Tutorials

18 04 2011
TheGODsOPINION

Hi Flash!
I love your Videos! Keep it up with the good work!

Maybe u can help me also in this case:
I have an HTML PAGE with TEXTAREA, DROP-DOWN-LIST and SUBMIT BUTTON
and lets say User typed “TEXT” in the TEXTAREA and CATEGORIZED it with the DROP-DOWN-LIST OPTION
called “OPTION1”. After he hit the SUBMIT Button, I would like that his “TEXT” is saved in the
MYSQL under FIELD “OPTION1”.

Whats the PHP Code for that?

Thank you in advance!

18 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

18 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

18 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

18 04 2011
Whisperingonthewind

Hi Adam Dreamweaver CS5 will not render some of your code.

This code will not render in DWCS5: –
$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error());
This code will render in DWCS5: –
$query = mysqli_query($myConnection, $sqlCommand) or die(“myConnection: ” . mysqli_error());

18 04 2011
rEs0LuTe12

you should try $pageid = mysql_real_escape_string($_GET[‘pid’]); to protect it from sql injection, anyways good job with the tutorial. 🙂

18 04 2011
dragon10y

@flashbuilding Do you know how I can fix this error ?
Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/beta.dragondesig­nz.eu/cms/index.php on line 7

18 04 2011
dragon10y

Can someone help me with this error ?

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/beta.dragondesignz.eu/cms/index.php on line 7

18 04 2011
samiwistler

PHP gurus

18 04 2011
JJDR04

Why is is so difficult to post a comment here? I keep geting an error message… something must be wrong with youtube here.

18 04 2011
acchu1986

thank you so much for the help….
But the query is printing only the last record in the browser. I am trying to complete the videos but i am getting stuck at some point of time.

Thanks

18 04 2011
acchu1986

Sir , Can you please tell me where is the $myConnection variable in the file .. I did not find it.. I just copied from ur site.

And also I am still getting the error..

Thanks.. Early response would be appreciated

18 04 2011
JJDR04

@acchu1986
Check the connect_to_mysql.php file inside the scripts folder. Remember that the $myConnection variable is is inside this file. make sure the path to the file is correct.

19 04 2011
JJDR04

@flashbuilding
I am Still struggling with it.Any luck anybody with highlighting the menu items
please help… Thanks everyone!

19 04 2011
acchu1986

Where is the $myConnection .. I am getting error

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/xxxxxx/public_html/index.php on line 8

19 04 2011
JJDR04

Hi Adam. Is there a way to highlight the generated menu links? In other words, highlight the current selected menu item. Any help will be greatly appreciated.

19 04 2011
JJDR04

I figured it out. If anybody is having this problem also, just replace the line:

if (!$_GET[‘pid’])

with:

if (!isset($_GET[‘pid’])).

In other words, set the variable Get to true by adding “isset” to it. The problem was that the Get variable, $pid was not being passed to the php engine.

I hope this can help someone. Thanks.

19 04 2011
JJDR04

Hi guys…On page load, I keep getting the message Undefined index: pid in F…
Even when I open the original files I download from Adam’s website. I am getting this error in the main index page.

If I click on any of the link buttons, the error disappear. Again, I only get this error when I first open the page on the browser.

Any help will be appreciated… Thanks

19 04 2011
aspdotnetexperts1

Thanks for sharing this informative Video. For Expert Level .NET Video’s visit “TheSYNERGETICS” channel on youtube . Synergetics is Awarded as the Best. NET Training Service Provider by Microsoft

19 04 2011
ztarrfect

@flashbuilding I actually find your voice relaxing on this vid 🙂

19 04 2011
sackyhead

I am getting this error: Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:xampphtdocsNEWCMSindex.php on line 7

Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:xampphtdocsNEWCMSindex.php on line 7

19 04 2011
ashperfectimage

If you need a Content Management Website cheek out my channel, I offer a CMS site digital Download!!

19 04 2011
lilabrowns

hey adam, i wanna get the last id from the query as my homepage not number 1, like any update on my site should be my homepage for that day,because right now i have to go to my database and change it to number 1 for any new updates to be a homepage ,any help

19 04 2011
lilabrowns

hey adam, i wanna get the last id from the query as my homepage not number 1, like any update on my site should be my homepage for that day,because right now i have to go to my database and change it to number 1 for any new updates to be a homepage ,any help

19 04 2011
Whisperingonthewind

Hi OB1 AKA Adam, I could not get part of the code to work, it needed isset, works a treat now woop at last. ;~)
if (!isset($_GET[‘pid’])){
$pageid=’1′;

Great Tutorials

19 04 2011
TheGODsOPINION

Hi Flash!
I love your Videos! Keep it up with the good work!

Maybe u can help me also in this case:
I have an HTML PAGE with TEXTAREA, DROP-DOWN-LIST and SUBMIT BUTTON
and lets say User typed “TEXT” in the TEXTAREA and CATEGORIZED it with the DROP-DOWN-LIST OPTION
called “OPTION1”. After he hit the SUBMIT Button, I would like that his “TEXT” is saved in the
MYSQL under FIELD “OPTION1”.

Whats the PHP Code for that?

Thank you in advance!

19 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

19 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

19 04 2011
danpp13

Hi I am having the same issue as some other people.
I have followed the tutorial perfectly and still have the same error:

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/***************/index.php on line 7

has anyone found the solution to this yet?

19 04 2011
Whisperingonthewind

Hi Adam Dreamweaver CS5 will not render some of your code.

This code will not render in DWCS5: –
$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error());
This code will render in DWCS5: –
$query = mysqli_query($myConnection, $sqlCommand) or die(“myConnection: ” . mysqli_error());

19 04 2011
rEs0LuTe12

you should try $pageid = mysql_real_escape_string($_GET[‘pid’]); to protect it from sql injection, anyways good job with the tutorial. 🙂

19 04 2011
dragon10y

@flashbuilding Do you know how I can fix this error ?
Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/beta.dragondesig­nz.eu/cms/index.php on line 7

19 04 2011
dragon10y

Can someone help me with this error ?

Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /public/sites/beta.dragondesignz.eu/cms/index.php on line 7

19 04 2011
samiwistler

PHP gurus

19 04 2011
JJDR04

Why is is so difficult to post a comment here? I keep geting an error message… something must be wrong with youtube here.

19 04 2011
acchu1986

thank you so much for the help….
But the query is printing only the last record in the browser. I am trying to complete the videos but i am getting stuck at some point of time.

Thanks

19 04 2011
acchu1986

Sir , Can you please tell me where is the $myConnection variable in the file .. I did not find it.. I just copied from ur site.

And also I am still getting the error..

Thanks.. Early response would be appreciated

19 04 2011
JJDR04

@acchu1986
Check the connect_to_mysql.php file inside the scripts folder. Remember that the $myConnection variable is is inside this file. make sure the path to the file is correct.

19 04 2011
JJDR04

@flashbuilding
I am Still struggling with it.Any luck anybody with highlighting the menu items
please help… Thanks everyone!

19 04 2011
acchu1986

Where is the $myConnection .. I am getting error

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home2/xxxxxx/public_html/index.php on line 8

19 04 2011
JJDR04

Hi Adam. Is there a way to highlight the generated menu links? In other words, highlight the current selected menu item. Any help will be greatly appreciated.

19 04 2011
JJDR04

I figured it out. If anybody is having this problem also, just replace the line:

if (!$_GET[‘pid’])

with:

if (!isset($_GET[‘pid’])).

In other words, set the variable Get to true by adding “isset” to it. The problem was that the Get variable, $pid was not being passed to the php engine.

I hope this can help someone. Thanks.

19 04 2011
JJDR04

Hi guys…On page load, I keep getting the message Undefined index: pid in F…
Even when I open the original files I download from Adam’s website. I am getting this error in the main index page.

If I click on any of the link buttons, the error disappear. Again, I only get this error when I first open the page on the browser.

Any help will be appreciated… Thanks

19 04 2011
aspdotnetexperts1

Thanks for sharing this informative Video. For Expert Level .NET Video’s visit “TheSYNERGETICS” channel on youtube . Synergetics is Awarded as the Best. NET Training Service Provider by Microsoft

19 04 2011
ztarrfect

@flashbuilding I actually find your voice relaxing on this vid 🙂

19 04 2011
sackyhead

I am getting this error: Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:xampphtdocsNEWCMSindex.php on line 7

Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:xampphtdocsNEWCMSindex.php on line 7

19 04 2011
ashperfectimage

If you need a Content Management Website cheek out my channel, I offer a CMS site digital Download!!

19 04 2011
lilabrowns

hey adam, i wanna get the last id from the query as my homepage not number 1, like any update on my site should be my homepage for that day,because right now i have to go to my database and change it to number 1 for any new updates to be a homepage ,any help

19 04 2011
lilabrowns

hey adam, i wanna get the last id from the query as my homepage not number 1, like any update on my site should be my homepage for that day,because right now i have to go to my database and change it to number 1 for any new updates to be a homepage ,any help




%d bloggers like this: