Category Archives: PHP Tutorial

PHP str_ireplace - featured

2 Demos of PHP str_ireplace functions (case-insensitive replacement)

The str_ireplace function In order to replace words in your strings with other words, you can use replace string function str_ireplace() in PHP. You can You can use str_replace() as well, however, this is a case sensitive function while str_ireplace() is not. See an example of str_ireplace PHP str_ireplace Syntax Following is the syntax of using the str_ireplace

4 examples to learn PHP class, object, static and inheritence

Grouping similar types of tasks into classes is termed as object oriented programming. Where Class is a combination of variables/properties and functions/methods. This chapter does not aim at explaining object oriented programming concepts thoroughly. The aim of this chapter is how to create and use PHP classes.

PHP send email | How to use PHP mail function and validate email

Often we see web sites having links to contact them by way of Contact Us or An Inquiry form or any other way. After clicking their visitors are presented with a form asking for information and then Submit. Generally an email is sent to webmaster or contact persons of that website. So in your PHP web site you will need to send email facility in many scenarios.

php MySQL_query function

How to use PHP mysql_query() to Insert, Select, Update and delete records from MySQL database

The mysql_query() function After establishing a connection to the MySQL and its specific database, it is time to work with the database records. Mostly, we need to insert, update, retrieve and delete records from the database tables. PHP provides a built-in function mysql_query() to achieve these tasks along with others. This chapter will explain how

php mysql connect | using mysql_connect function to establish DB connection

Establishing DB connection with mysql_connect PHP provides built-in function mysql_connect to establish database connection with MySQL database. See the syntax below connection mysql_connect(server,user,passwd,new_link,client_flag); We have assumed that you have created a database with: database name = testdb user name = tesuser password = testpassword at your local system. In that case: DB host = “localhost”

PHP MySQL tutorial | How to use mysql and php for web development

Brief about MySQL MySQL is an open source relational data base management system now owned by Oracle. MySQL is particularly popular for web based applications. It is being supported by most of server side scripting languages like PHP. Many big sites use MySQL as database like Wikipedia and youtube as well. MySQL is multi-user and

PHP basename() example with file upload

The basename() function used to return file name from a given path. The basename function is generally used in PHP fileupload script to let users upload files.

How to use PHP move_uploaded_file to move uploaded file

The move_uploaded_file() function is used to move uploaded file to specified location. The move_uploaded_file() function returns true if move is successful and false if it fails.

the uploaded file exceeds the upload_max_filesize directive in php.ini

How to increase upload file limit In previous chapter we covered how to upload file in PHP script, this only covers single file upload with default upload limit size defined by PHP, which is generally 3 MBs. However there will be situation where you are offering your visitors to upload files and desired limit is

PHP file upload

PHP file upload by using $_FILES array

This chapter will take you through how to upload files by using PHP script. File upload is required in many scenarios to allow users of your site to select files from their local computers and upload to your website. These files may include images uploads, pdfs, audio or video files depending on your requirement.