Search Tutorials

Foss: PHP and MySQL - English

Outline: XAMPP in Windows Installing XAMPP in Windows XAMPP is a cumulative package consisting of Apache, PHP and MySQL Packages is available for Windows In this tutorial the XAMPP will be installed and t..

Basic

Foss: PHP and MySQL - English

Outline: XAMPP in Linux Installing XAMPP in Linux XAMPP is a cumulative package consisting of Apache, PHP and MySQL Packages is available for Linux In this tutorial the XAMPP will be installed and the def..

Basic

Foss: PHP and MySQL - English

Outline: Echo Function The echo() function outputs one or more strings. Syntax: echo(strings); Ex. echo "Hello World!";

Basic

Foss: PHP and MySQL - English

Outline: Variables in PHP Variables are used for storing values, like text strings, numbers or arrays. When a variable is declared, it can be used over and over again in your script. All variables in PHP ..

Basic

Foss: PHP and MySQL - English

Outline: If Statement if statement - use this statement to execute some code only if a specified condition is true. if...else statement - use this statement to execute some code if a condition is true and ..

Basic

Foss: PHP and MySQL - English

Outline: Switch Statement switch statement - use this statement to select one of many blocks of code to be executed

Basic

Foss: PHP and MySQL - English

Outline: Arithmatic Operators Ex. +,-,*,/,%,++,--

Basic

Foss: PHP and MySQL - English

Outline: Comparison Operators Ex. ==,!=,<>,>,<,>=,<=

Basic

Foss: PHP and MySQL - English

Outline: Logical Operators Ex. && (AND),|| (OR),! (NOT)

Basic

Foss: PHP and MySQL - English

Outline: Arrays An array stores multiple values in one single variable. Numeric array - An array with a numeric index. Associative array - An array where each ID key is associated with a value. Ex. Numer..

Basic

Foss: PHP and MySQL - English

Outline: Multi-Dimensional Arrays In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.

Basic

Foss: PHP and MySQL - English

Outline: Loops - While Statement The while loop executes a block of code while a condition is true. while (condition) { code to be executed; }

Basic

Foss: PHP and MySQL - English

Outline: Loops - Do-While Statement The do...while statement will always execute the block of code once, it will then check the condition, and repeat the loop while the condition is true. do { ..

Basic

Foss: PHP and MySQL - English

Outline: Loops - For Statement The for loop is used when you know in advance how many times the script should run. Syntax: for (init; condition; increment) { code to be executed; }

Basic

Foss: PHP and MySQL - English

Outline: Loops - Foreach Statement The foreach loop is used to loop through arrays. foreach ($array as $value) { code to be executed; }

Basic

Foss: PHP and MySQL - English

Outline: Functions (Basic) To keep the script from being executed when the page loads, you can put it into a function. A function will be executed by a call to the function. You may call a function from a..

Basic

Foss: PHP and MySQL - English

Outline: Functions (Advanced) We can also pass parameters to functions during both the declaration and calling time. function functionName($param1,$param2); //during function call. function functionName($..

Basic

Foss: PHP and MySQL - English

Outline: GET Variable The built-in $_GET function is used to collect values from a form sent with method="get". Information sent from a form with the GET method is visible to everyone (it will be displayed..

Basic

Foss: PHP and MySQL - English

Outline: POST Variable The built-in $_POST function is used to collect values from a form sent with method="post". Information sent from a form with the POST method is invisible to others and has no limits..

Basic

Foss: PHP and MySQL - English

Outline: Embedding PHP We can embed our PHP code anywhere in the webpage, by enclosing our script within the <?php...... //SCRIPT.......?>

Basic

Foss: PHP and MySQL - English

Outline: Common Way to Display HTML We can also use the HTML Code within the PHP Script. Almost each of the HTML Tags can be used within a PHP Script.

Basic

Foss: PHP and MySQL - English

Outline: Common Errors (Part 1) Learn how to spot errors and how to fix them Common Parse errors Parse errors due to missing comma or semicolon Parse errors due to not ending single or double quotes corr..

Basic

Foss: PHP and MySQL - English

Outline: Common Errors (Part 2) Parse error due to missing or extra brackets Matching brackets during complex mathematical operations Purpose and usefulness of correct indentation Errors due to missing o..

Basic

Foss: PHP and MySQL - English

Outline: Common Errors (Part 3) "Cannot modify header information - headers already sent by..." errors when using header() function Using ob_start() to turn on output buffering "Failed to open stream; no ..

Basic

Foss: PHP and MySQL - English

Outline: MySQL (Part 1) An Introduction to the PHPMyAdmin Interface. Creating a New Database Creating a new Table and entering the value of the field with the requisite datatype. SQL Query displayed in t..

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 2) Connecting to the database and inserting dummy data into the database. mysql_connect("server_addr", "username", "password") - Connect to the Database Server with the authorised user..

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 3) Writing some data into the database (INSERT and UPDATE Queries). mysql_query('TYPE_HERE_YOUR_MYSQL_QUERY') - This function is used to run specific queries on our database. INSERT Q..

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 4) Getting data from the database table and displaying it. SELECT QUERY - SELECT * FROM table_name WHERE att1='abc' // Query returns the value from the database where att1 = abc mysql..

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 5) mysql_fetch_assoc — Fetch a result row as an associative array. array mysql_fetch_assoc ( resource $result ) //Returns an associative array that corresponds to the fetched row and m..

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 6) Getting data from the database with the help of an HTML form. Creating a FORM where a user can specify a name and selecting the appropriate value from the database.

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 7) Changing the existing values of the databse table using HTML Forms. Update unique records using the id than individual values.

Intermediate

Foss: PHP and MySQL - English

Outline: MySQL (Part 8) DELETE QUERY - To Delete the specific or all the entries of the Database. DELETE FROM table_name WHERE field='xyz' // Deletes the entry from the database where the field = xyz.

Intermediate

Foss: PHP and MySQL - English

Outline: Simple Visitor Counter Counts how many users have viewed your page as per count of refresh button clicked fopen("file_name","parameter") opens a file (Creates it if not exists).parameter assigns t..

Advanced

Foss: PHP and MySQL - English

Outline: PHP String Functions (Part 1) strlen(string) - This function counts total no of characters, including numbers and white spaces in the string mb_substr(string,starting_position,no_of_characters) ..

Advanced

Foss: PHP and MySQL - English

Outline: PHP String Functions (Part 2) strrev(string) -This function is used to reverse the inputed string strtolower(string) -This function is used to convert all alphabatic characters in string to thier ..

Advanced

Foss: PHP and MySQL - English

Outline: File Upload (Part 1) Setup html form for file uploading Upload file and get file related information like file name, file size, etc Check for error messages after uploading file

Advanced

Foss: PHP and MySQL - English

Outline: File Upload (Part 2) Move file from temporary area to user specified location Restrict uploading to only specific file type Restrict uploading to a maximum file size

Advanced

Foss: PHP and MySQL - English

Outline: Cookies (Part 1) What are cookies Set cookies using setcookie function Understaing how to set expiry time of cookies Read and print values from existing cookies Print every cookie that we have ..

Advanced

Foss: PHP and MySQL - English

Outline: Cookies (Part 2) Check if a cookie exists or not using isset Unset a cookie when no longer required Change the value of a existing cookie

Advanced

Foss: PHP and MySQL - English

Outline: 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 ..

Advanced

Foss: PHP and MySQL - English

Outline: MD5 Encryption Calculates the MD5 hash of str using the RSA Data Security, Inc.'s MD5 Message-Digest Algorithm, and returns that hash (Its a one way encrypting technique). Syntax : string md5 ( s..

Advanced

Foss: PHP and MySQL - English

Outline: Sending Email (Part 1) Create HTML form for getting email subject and message from the user Using the mail() function to send email

Advanced

Foss: PHP and MySQL - English

Outline: Sending Email (Part 2) Validating whether the name and message have been entered by the user Check the length of the string using the strlen() function. Set up the to, subject and message field o..

Advanced

Foss: PHP and MySQL - English

Outline: Sending Email (Part 3) Fix the "Sendmail from not set in php dot ini" error Create the mail "From:" header Using a local or external mail server to send email Using the ini_set() and ini_get() f..

Advanced

Foss: PHP and MySQL - English

Outline: Display Images from a Directory Using opendir() to open a directory handle Using readdir() to read a directory that is already opened Printing the directory listing

Advanced

Foss: PHP and MySQL - English

Outline: User Login Part 1 Collecting information from user in a form & connecting to authorized database. mysql_connect("hostname", "username", "password") - Connect to the Database Server with the author..

Advanced

Foss: PHP and MySQL - English

Outline: User Login Part 2 retrieves information about inputed username and checks whether given password matches with the password in database. mysql_query('TYPE_HERE_YOUR_MYSQL_QUERY') - It is used to ru..

Advanced

Foss: PHP and MySQL - English

Outline: User Login Part 3 Creating session for holding value and destroying that value by destroying session. start_session() - Starts session to hold information from one pages to other until the session..

Advanced

Foss: PHP and MySQL - English

Outline: User Password Change Part 1 We learn to obtain old existing password and new password from the user. start_session() - Hold information from previous pages to session page. $variable_name=$_SESSI..

Advanced

Foss: PHP and MySQL - English

Outline: User Password Change Part 2 Checking whether encrypted old password matches with the database password and new password is same as confirm password. md5("parameter")- encrypts parameter into irrev..

Advanced

Foss: PHP and MySQL - English

Outline: User Password Change Part 3 updating the new password in database. mysql_query('TYPE_HERE_YOUR_MYSQL_QUERY') - It is used to run specific queries on our database. Here it updates new password into..

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 1 Creating a form which allows user to input values in page

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 2 Striping tags of inputed strings and converting password into md5 encryption. Use of : strip_tags(strigs) - cuts down unnecessary spaces,html tags and queries from string.

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 3 Checking whether the username and password provided meet the required length sizes. Use of : strlen("string") - counts th character length of the string.

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 4 Inserting inputed information from the user into the database table through query. mysql_connect("hostname", "username", "password") - Connect to the Database Server with ..

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 5 Converting the password inputed from user to md5 encrypt form. md5("parameter")- encrypts parameter into irreversible logical code.

Advanced

Foss: PHP and MySQL - English

Outline: User Registration Part 6 Checking the username provided so that condition for duplicate username can be avoided. mysql_query('TYPE_HERE_YOUR_MYSQL_QUERY') - This is used to run specific queries on..

Advanced