
Build an instant update database interface with jQuery/AJAX
Download Komodo Edit from http://komodoide.com/komodo-edit/
XAMPP is the most popular local webserver package and has versions for Windows, Mac OS, Linux and Solaris.
Step-by-step instructions on downloading and installing XAMPP on a Windows PC.
If you get the error message:
Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues
then another program, most commonly Skype, is blocking port 80.
Carry out the following steps to solve the problem:
If this does not work, or you do not have Skype installed, carry out the folllowing steps:
Apache and MySQL should now start automatically and without conflicts.
Writing the HTML document structure for the single movie page.
Writing the HTML document structure for the generic admin page.
We use classes and IDs to distinguish HTML elements for styling and functional purposes respectively.
Internet Explorer versions 8 and below does not support the new HTML5 elements and garbles our box layout. We solve this by using two scripts, html5-shiv and html5-printshiv.
NB - the link to HTML5Shiv has moved to cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js so please make this change in your version of the project.
NOTE AS OF JUNE 2019: A student has informed me that this no longer works. It is becoming unnecessary now to support IE8 - users really should have upgraded a very long time ago, but here is a new link to html5-shiv provided by the student. Please check this and add it if you want to support IE8:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
Adding the styles for the footer.
‘PHP’ stands for ‘PHP – Hypertext Pre-processor’. Ordinary HTML provides the static framework of a website while PHP gets data from a database to provide dynamic, ever-changing, content.
Arrays are a type of variable which contains sets of multiple values in a structured list, allowing us to organise related collections of data.
We use functions to keep our variables from getting out of control.
A database is a structured collection of records, organised in tables, each record consisting of a number of fields. Relational databases use linking tables to make links between tables without duplication of data.
Using phpMyAdmin to create a new database and add tables to it.
Using SQL queries in phpMyAdmin to display records from a database table.
The SQL query in phpMyAdmin to update an existing record in the database.
How to return all the records from a database using SQL embedded in PHP.
If you get the error "Call to a member function on a non-object", then there is a mismtach between the database column names you have supplied in the PHP and those you have actually used in the table. Double check that you have not, for instance named a column `first_name` when it should be `firstname`.
Backticks (` `), for which the key on a UK/US keyboard is at the top left next to the key for '1', can be used to enclose table and column names if there is a danger that you have used MySQL reserved words to name database columns. To do so is not good practice and should be avoided. As long as your database column names have no special meaning in MySQL, you do not need to enclose them in backticks.
Values must be enclosed in single quotes (' ') - if they are not enclosed this will also throw an error.
Using PHP includes we create a single parent page which generates either a single movie or a list of movies according to whether a movie is chosen in the URL.
Setting include paths in the parent files, index.php and admin.php, obviates the need to specify the path names of include files and functions.
Change dummy data in the movies admin table to dynamic data.
If you already have Firebug installed in Firefox, skip this lesson. Otherwise, install Firebug from www.getfirebug.com.
To target elements just added by jQuery we have to use the event handler ‘on’: $(document).on('event', 'selector', function()
JQuery alone does nothing to the database – to alter database
records we must use a PHP script and pass variables to it using an AJAX call.
Adapting the click-to-add AJAX call to make the drag-to-delete equivalent appears simple, but there are two problems to be overcome: enabling jQuery on newly added DOM elements and preventing event-bubbling.
"This has been one of the best web courses ever. It should be used as a model by almost anyone thinking of teaching on the web. It has cleared out nearly a decade of web programming cobwebs. The fact you have made a course which is complete end-to-end is impressive. The fact that code examples all work puts nearly every programming book and most web courses to shame."
Paul Wolfson, Principal Investigator, Dallas Legal Technology
---------------------------------------------------------------------------------------------------------
"The Ultimate Web Development course is the most user friendly course I have encountered to date. Additionally, the lecturer, Dr. Richard Stibbard is extremely committed and accessible. Oh! If only all the on-line lecturers could take a page from his book."
Urich Wilmot-Hoyte
-----------------------------------------------------------------------------------------------------------
"Solid Full Stack Development course - I have been through numerous other books and courses trying to get up to speed on CSS, JQuery, Ajax, and PHP, and so far this is the most effective. I think there are two keys to it's success. First, the app developed throughout the course is reasonably complex and whether its a particular look in CSS or behaviour in jQuery, it accurately reflects what modern apps really look like. Next, there is enough hands on coding in all the tools that it really begins to stick. HIghly recommended for anyone wanting broad introduction to modern web development that really touches almost all the bases."
Donald Brummel
-----------------------------------------------------------------------------------------------------------
Taught by freelance developer and experienced online educator Dr. Richard Stibbard, this course takes you in easy steps through the entire process of building an up-to-date web interface which updates its database and HTML on the fly without the need for page refreshes, rather like the 'Add to Favourites' function on Youtube or Trivago's hotel search.
You will learn how to:
The course is equally suitable for beginners or more advanced students. For beginners there are step-by-step instructions which take you through every step of the project until all the principles have been covered, and then hand over to assignments which allow you to put into practice what you have learned before you see the solutions.
For learners already familiar with some aspects of web design and development who want to move onto specific points more quickly, incremental working files and clear guidance are provided at every stage, allowing you to skip lessons you do not need and rejoin the course at any point without losing track of the necessary code.
With studio quality audio, widescreen HD video, and incremental versions of the source code, this efficiently organized course teaches up-to-date coding techniques and gives comprehensive coverage of an important aspect of modern web development.