Author Archives: Help_adm

PHP MySQL Introduction

MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database objects called tables. A table is a collections of related data entries and it consists of columns and rows. Databases are useful when storing information categorically. A company may have a database… Read More »

Category: PHP

PHP Filter

PHP filters are used to validate and filter data coming from insecure sources, like user input. What is a PHP Filter? A PHP filter is used to validate and filter data coming from insecure sources. To test, validate and filter user input or custom data is an important part of any web application. The PHP… Read More »

Category: PHP

PHP Error Handling

The default error handling in PHP is very simple. An error message with filename, line number and a message describing the error is sent to the browser. PHP Error Handling When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional… Read More »

Category: PHP

PHP Secure E-mails

There is a weakness in the PHP e-mail script in the previous chapter. PHP E-mail Injections First, look at the PHP code from the previous chapter: <html> <body> <?php if (isset($_REQUEST[’email’])) //if “email” is filled out, send email  {   //send email   $email = $_REQUEST[’email’] ;   $subject = $_REQUEST[‘subject’] ;   $message =… Read More »

Category: PHP

PHP Sending E-mails

PHP allows you to send e-mails directly from a script. The PHP mail() Function The PHP mail() function is used to send emails from inside a script. Syntax mail(to,subject,message,headers,parameters) Parameter Description to Required. Specifies the receiver / receivers of the email subject Required. Specifies the subject of the email. Note: This parameter cannot contain any… Read More »

Category: PHP

PHP Sessions

A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, and are available to all pages in one application. PHP Session Variables When you are working with an application, you open it, do some changes and then you close it.… Read More »

Category: PHP

PHP Cookies

A cookie is often used to identify a user. What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user’s computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP,… Read More »

Category: PHP

PHP File Upload

With PHP, it is possible to upload files to the server. Create an Upload-File Form To allow users to upload files from a form can be very useful. Look at the following HTML form for uploading files: <html> <body> <form action=”upload_file.php” method=”post” enctype=”multipart/form-data”> <label for=”file”>Filename:</label> <input type=”file” name=”file” id=”file” /> <br /> <input type=”submit” name=”submit”… Read More »

Category: PHP

PHP File Handling

The fopen() function is used to open files in PHP. Opening a File The fopen() function is used to open files in PHP. The first parameter of this function contains the name of the file to be opened and the second parameter specifies in which mode the file should be opened: <html><body><?php$file=fopen(“welcome.txt”,”r”);?></body></html> The file may… Read More »

Category: PHP

PHP Include File

Server Side Includes (SSI) are used to create functions, headers, footers, or elements that will be reused on multiple pages. Server Side Includes You can insert the content of a file into a PHP file before the server executes it, with the include() or require() function. The two functions are identical in every way, except… Read More »

Category: PHP