How can I prevent SQL injection in PHP?

Question: If user input is inserted without modification into an SQL query, then the application becomes vulnerable to SQL injection, like in the following example: $unsafe_variable = $_POST[‘user_input’]; mysql_query(“INSERT INTO `table` (`column`) VALUES (‘$unsafe_variable’)”); That’s because the user can input something

Read More »

What is a NullPointerException? How do I fix it?

Question: What are Null Pointer Exceptions (java.lang.NullPointerException)? How do I determine the cause? I want to stop the exception from causing the program to terminate prematurely. Answer: NullPointerException occurs when you use a reference that points to no location in

Read More »

Why You Must Relax After Work

Science confirms what we all knew, deep down: after a long, hard day at work, doing something fun and relaxing can help you sleep better at night. Sometimes, something just feels right. Like when you have a bad day at

Read More »

Is It OK To Take An Online Course

It is more than ok, it’s invaluable! Online courses can help you to gain communication skills, the ability to self-motivate, organisation skills and time management. You can gain all of these on top of the knowledge taught in the online

Read More »