Tutorials

Today you will learn how to create your own custom PHP functions. Create your own function PHP reads from top to bottom. The actual function has to be above whatever you're calling. To create a custom function, you need to create a custom variable for the function to use; this variable will be whatever you send to the function.

Posted by in PHP

Today you will learn how to insert a file into PHP. This is a very useful function as sometimes you might want only one copy of a global feature. If you have a navigation bar, headers or footers that stay the same throughout your site, it is really useful to have it in one central location. Imagine having a big website with a million pages and your boss tells you to change the new copyright year.

Posted by in PHP

Hello and welcome to PHP Trainee. Now that your database is set up, you will learn how to grab data from it. How do you select data from a MySQL row? After you access the database, you have to select and query your results. There are 3 fetch statements used by PHP to grab queries: mysql_fetch_assoc, mysql_fetch_row and mysql_fetch_array.

Posted by in MySQL

In my previous cookie and session tutorial, I explained that they were not secure in their basic state. Hackers love to take control of your security sessions. So what can we do to increase security? There are 3 common methods hackers use to steal sessions: prediction, fixation and capture. Sessions 101 Before I get into what session hacking is and how to stop it, lets get some basics down on how sessions work.

Posted by in PHP

Allowing user interaction with your server is great. But it's also a hacker's favorite hunting ground for unsecured data. This lesson will be about how to stop hackers from stealing your data. No code today, it's just going to be a lecture. What is a man-in-the-middle attack? It's a peeping tom with binoculars.

Posted by in Computer