Escape Strings For MySQL To Avoid SQL Injection

Escape Strings For MySQL To Avoid SQL Injection

With all the talk about working with databases using MySQL and PHP in this tutorial series, one thing we didn’t cover yet is SQL Injection and how to protect your site from it. The syntax for MySQL is very specific, and if you don’t get it right, it is easy to break. As we build up queries using dynamic data from our variables in PHP, you need to be careful that any data contained in those variables do not break the syntax as well.…

PHP MySQL CRUD Tutorial

4 Components Of CRUD With Native PHP and MySQL

In the last lesson we learned more about working with results from select queries in MySQL. In other words, when we used PHP to build up a query and send it to MySQL, MySQL then sent back a resource which could be massaged by any of the four techniques we discussed to get access to the data contained in the resource. So of all the MySQL commands such as SELECT, INSERT, UPDATE, and DELETE, SELECT is the only one to return a resource on success which requires further processing.…

Process Returned MySQL Query Results In PHP

4 Cool Ways To Process Returned MySQL Query Results In PHP

In the prior episode of working with MySQL and PHP, we took a good look at the entire process of getting data to work with. This involved setting up a database connection, testing the database connection, defining a query, running said query, processing any results we got back, releasing memory, and closing the database connection. Bing, Bang, Boom, we’re talking to the database successfully. In this PHP and MySQL Tutorial we’ll take a closer look at the processing portion of this cycle.…

PHP And MySQL Tutorial

5 Essential Steps For Database Nirvana With PHP

This PHP Tutorial Series has gone soup to nuts covering all of the fundamental aspects of using PHP to build dynamic websites. Based on all of the concepts covered so far, you should be able to build links to pages, pass data via $_GET in those links, create forms, collect user data via $_POST in those forms, as well as use cookies and sessions to establish state and customized user experiences.…

PHP Cookies And Sessions

php cookies

So we’ve taken a look at how you can pass data in PHP. When dealing with URLs and Links, we’re typically working with data by way of the $_GET super global array. If on the other hand we need to process data that has been submitted via an HTML form, this is typically done with some form of $_POST super global processing. There is another way to work with variable data, and that is by using cookies and sessions.…

Process HTML Forms With PHP

This Is The Processing Form Data With PHP Tutorial Youll Love

Working with Forms when building websites seems so easy. There are in fact many details to be aware of. In the HTML Tutorial Series, we had a good look at an HTML Form Tutorial, but we didn’t get a chance to investigate how we would actually process the data we collect from the form. Now we are in the midst of a great PHP Tutorial Series and what better time to have a look at Form Processing with PHP than right now.…

Process HTTP Request With PHP

Don't Let HTTP Kill Your Mojo No Matter How Hard It Tries

Everything we do with building websites has a dark underside, and it’s called the HTTP Protocol. Actually, it’s not dark, it’s great as this is what makes all this internet stuff possible. You see when you visit a website and the server sends HTML to you over the internet, there is something that comes first, before any of the HTML even gets to your browser.…