Most of the time we use mysql_select_db() to select a mysql database, the syntax is mysql_select_db( db_name, connection ); The above syntax results a boolean value, i.e. either true (1) or false(0). Alternatively, you can use MySQL command: USE database_name Let me show you how to use it with PHP. You can implement the above […]
Archive for the ‘PHP’ Category
Making PHP login more secure with some tweaks in MD5 hashing
There are several methods to make your login script secure. The most crucial step for that is obviously to escape strings using real_escape_string() function that varies from the PHP version. This will get you rid of some common SQL injection attacks via form or address bar. Another thing you must make secure is the user password. […]
Download Files directly to your web host server faster and easier
Needless to say that it’s a hectic job to download and upload a file from some website to your hard drive and again upload and extract it to your server. Imagine how much time are you loosing in this process. But imagine how you can save your time by directly downloading it to your own web server. […]
How to access WordPress Database Away from WordPress Root
WordPress by defauly supports globally announcing $wpdb to access the WordPress. But in case you are away from the WordPress root you’ll need to redefine the database information to access WordPress. Again after accessing the database you may need to redefine the database prefix, which will really eat your time and dynamic ability of your […]
Enter Unicode characters in MySQL
PHP 5 and MySQL 4.1 supports UTF-8 natively (without special compilation options) . However one must take care if the data is stored properly and can be viewed properly. In this tutorial, I am going to guide you to input unicode characters and fetch it out in MySQL 4.1+ version using PHP 5. MySQL has […]
Creating your own WordPress like blog using PHP & MySQL- Basic
Today in my blockbuster tutorial, I am going to teach you how to create your own dynamic (Content management system) blog website. Before beginning, let me tell you the basic skills you’ll need: CSS JavaScript (optional) PHP MySQL HTML Let’s categorize the jobs to be done to make perfect, or at least, good CMS. Basic […]
Install PHP and MySQL server without any tweaks- just easy install
I’ve read a lots of post with a technique to install Apache Server. But all of them needed some tweaks making it harder to understand for basic and learning person like you. Therefore understanding such situation, I created this tutorial. In this tutorial, I’ll be teaching you how to setup an Apache Server without modifying […]