Category Archives: php

How To: Insert Data into Database using Check Box in PHP

Here i am going to insert data into mysql database using checkbox in php script. In radio button, only one option have to be selected under many option and all that options name will be same. In Checkbox also same as the radio button’s properties, but the difference between them is many options can be… Read More »

Category: php

Simple PHP Code To Upload Files

In this tutorial i have given the simple php code to upload files into server directory. To upload file <form> should contain  enctype=”multipart/form-data”, input type is file. $_FILES[‘photo’][‘name’] – This will give the name of the uploaded file $_FILES[‘photo’][‘tmp_name’] – Temporary name will be created for file to be uplaoded.  $_FILES[“file”][“type”] – Returns file type i.e., format… Read More »

Category: php

How To: Remove Space from String in PHP

Spaces in a string will makes problem, when that string is to used as username or password. There are many php functions available to remove the space from string. Here we are going to see removing spaces from strings in php using php functions. Some of them are trim() rtrim() str_replace() Need of removing space… Read More »

Category: php

Php Code to Get Current Webpage URL

PHP having the super global variables $_SERVER to get currently using page URL URL – http://www.tobbynews.com/page/2.php $_SERVER[‘PHP_SELF’] PHP_SELF will return the currently working webpage with their directory path ( /page/2.php ) $_SERVER[‘SCRIPT_NAME’] SCRIPT_NAME is introduced in CGI, and it also returns the currently working webpage ( /page/2.php ) $_SERVER[‘HTTP_HOST’] HTTP_HOST is a client controlled value… Read More »

Category: php

PHP Code to Get IP address of Website Visitor

Knowledge about where the website is visited is important and how many visits are made by a same visitor. This can possible only by tracking IP address of the visitor, every internet user will have an unique IP address by this we can calculate from where our website is being visited. Along with tracking of… Read More »

Category: php

What is the difference between Apache and WAMP Server

Is it Need to install Apache or WAMP server in computer to use PHP? Yes, because PHP is server side scripting language and it runs only in server. By installing apache server, our client OS ( client OS means windows xp/vista/7) computer will acts as both server and client. Here client means browser and server… Read More »

Category: php

What is the difference between include() and require() in php

include() and require() function does the cell phone spy canada same process of calling a php or html or js file. When the included file (i.e., calling a file) is missing in its actual directory, then require() function will returns FATAL ERROR and include() function will return WARNING. Read: what is the use of include()… Read More »

Category: php