Nwahy Articles V3 pro

php

XML DOM

XML DOM

[L]The built-in DOM parser makes it possible to process XML documents in PHP. -------------------------------------------------------------------------------- [color=FA0309]What is DOM?[/color] The W3C DOM provides a standard set of objects for HTML and XML documents, and a standard interface for accessing and manipulating them. The W3C DOM is separated into different parts (Core, XML, and HTML) and different levels (DOM Level 1/2/3): * Core DOM - defines a standard set of objects for any structured document * XML DOM - defines a standard set of objects for XML documents * HTML ...

تاريخ الإضافة: 20/3/2008

زيارات: 1468

XML Expat Parser

XML Expat Parser

[L]The built-in Expat parser makes it possible to process XML documents in PHP. -------------------------------------------------------------------------------- [color=FA0309]What is XML?[/color] XML is used to describe data and to focus on what data is. An XML file describes the structure of the data. In XML, no tags are predefined. You must define your own tags. If you want to learn more about XML, please visit our XML tutorial. -------------------------------------------------------------------------------- [color=FA0309]What is Expat?[/color] To read and update - create ...

تاريخ الإضافة: 20/3/2008

زيارات: 1553

Database ODBC

Database ODBC

[L]ODBC is an Application Programming Interface (API) that allows you to connect to a data source (e.g. an MS Access database). -------------------------------------------------------------------------------- [color=FA0309]Create an ODBC Connection[/color] With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available. Here is how to create an ODBC connection to a MS Access Database: 1- Open the Administrative Tools icon in your Control Panel. 2- Double-click on the Data Sources (ODBC) icon inside. 3- ...

تاريخ الإضافة: 20/3/2008

زيارات: 2963

MySQL Delete From

MySQL Delete From

[L]The DELETE FROM statement is used to delete rows from a database table. -------------------------------------------------------------------------------- [color=FA0309]Delete Data In a Database[/color] The DELETE FROM statement is used to delete records from a database table. [color=FA0309]Syntax[/color] [code]DELETE FROM table_name WHERE column_name = some_value[/code] [U]Note[/U]: SQL statements are not case sensitive. DELETE FROM is the same as delete from. To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a ...

تاريخ الإضافة: 20/3/2008

زيارات: 1574

MySQL Update

MySQL Update

[L]The UPDATE statement is used to modify data in a database table. -------------------------------------------------------------------------------- [color=FA0309]Update Data In a Database[/color] The UPDATE statement is used to modify data in a database table. [color=FA0309]Syntax[/color] [code]UPDATE table_name SET column_name = new_value WHERE column_name = some_value [/code] [U]Note[/U]: SQL statements are not case sensitive. UPDATE is the same as update. To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a query ...

تاريخ الإضافة: 20/3/2008

زيارات: 1684

MySQL Order By Keyword

MySQL Order By Keyword

[L]The ORDER BY keyword is used to sort the data in a recordset. -------------------------------------------------------------------------------- [color=FA0309]The ORDER BY Keyword[/color] The ORDER BY keyword is used to sort the data in a recordset. [color=FA0309]Syntax[/color] [code]SELECT column_name(s) FROM table_name ORDER BY column_name [/code] [U]Note[/U]: SQL statements are not case sensitive. ORDER BY is the same as order by. [color=FA0309]Example[/color] The following example selects all the data stored in the "Person" table, and sorts the result by the "Age" ...

تاريخ الإضافة: 20/3/2008

زيارات: 1581

MySQL The Where Clause

MySQL The Where Clause

[L]To select only data that matches a specified criteria, add a WHERE clause to the SELECT statement. -------------------------------------------------------------------------------- [color=FA0309]The WHERE clause[/color] To select only data that matches a specific criteria, add a WHERE clause to the SELECT statement. [color=FA0309]Syntax[/color] [code]SELECT column FROM table WHERE column operator value [/code] The following operators can be used with the WHERE clause: [CENTER][img]images/im/sql5.jpg[/img][/CENTER] [U]Note[/U]: SQL statements are not case sensitive. WHERE ...

تاريخ الإضافة: 20/3/2008

زيارات: 1524

MySQL Select

MySQL Select

[L]The SELECT statement is used to select data from a database. -------------------------------------------------------------------------------- [color=FA0309]Select Data From a Database Table[/color] The SELECT statement is used to select data from a database. [color=FA0309]Syntax[/color] [code]SELECT column_name(s) FROM table_name [/code] Note: SQL statements are not case sensitive. SELECT is the same as select. To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a query or command to a MySQL ...

تاريخ الإضافة: 20/3/2008

زيارات: 1513

MySQL Insert Into

MySQL Insert Into

[L]The INSERT INTO statement is used to insert new records into a database table. -------------------------------------------------------------------------------- [color=FA0309]Insert Data Into a Database Table[/color] The INSERT INTO statement is used to add new records to a database table. [color=940306]Syntax[/color] [code]INSERT INTO table_name VALUES (value1, value2,....) [/code] You can also specify the columns where you want to insert the data: [code]INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....) [/code] [U]Note[/U]: SQL statements are ...

تاريخ الإضافة: 20/3/2008

زيارات: 1825

MySQL Create Database and Tables

MySQL Create Database and Tables

[L]A database holds one or multiple tables. -------------------------------------------------------------------------------- [color=FA0309]Create a Database[/color] The CREATE DATABASE statement is used to create a database in MySQL. [color=FA0309]Syntax[/color] [code]CREATE DATABASE database_name[/code] To get PHP to execute the statement above we must use the mysql_query() function. This function is used to send a query or command to a MySQL connection. [color=FA0309]Example[/color] In the following example we create a database called "my_db": [php][/php] ...

تاريخ الإضافة: 20/3/2008

زيارات: 2747

MySQL Connect to a Database

MySQL Connect to a Database

[L]The free MySQL Database is very often used with PHP. -------------------------------------------------------------------------------- [color=FA0309]Connecting to a MySQL Database[/color] Before you can access and work with data in a database, you must create a connection to the database. In PHP, this is done with the mysql_connect() function. [color=FA0309]Syntax[/color] [php]mysql_connect(servername,username,password); [/php] [CENTER][img]images/im/sql3.jpg[/img][/CENTER] [U]Note[/U]: There are more available parameters, but the ones listed above are the most ...

تاريخ الإضافة: 20/3/2008

زيارات: 1641

MySQL Introduction

MySQL Introduction

[L]MySQL is the most popular open source database server. -------------------------------------------------------------------------------- [color=FA0309]What is MySQL?[/color] MySQL is a database. A database defines a structure for storing information. In a database, there are tables. Just like HTML tables, database tables contain rows, columns, and cells. Databases are useful when storing information categorically. A company may have a database with the following tables: "Employees", "Products", "Customers" and ...

تاريخ الإضافة: 20/3/2008

زيارات: 1584

PHP Filter

PHP Filter

[L]PHP filters is used to validate and filter data coming from insecure sources, like user input. -------------------------------------------------------------------------------- [color=FA0309]What is a PHP Filter?[/color] 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 filter extension is designed to make data filtering easier and quicker. -------------------------------------------------------------------------------- [color=FA0309]Why ...

تاريخ الإضافة: 20/3/2008

زيارات: 1563

Exception Handling

Exception Handling

[L]Exceptions are used to change the normal flow of a script if a specified error occurs -------------------------------------------------------------------------------- [color=FA0309]What is an Exception[/color] With PHP 5 came a new object oriented way of dealing with errors. Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception. This is what normally happens when an exception is triggered: - The current code state is saved - The code execution will switch to a ...

تاريخ الإضافة: 20/3/2008

زيارات: 1435

Error Handling

Error Handling

[L]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. -------------------------------------------------------------------------------- [color=FA0309]PHP Error Handling[/color] 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 and you may be open to security risks. This tutorial contains some of the most common error checking methods in PHP. We will show different error ...

تاريخ الإضافة: 20/3/2008

زيارات: 1550

Secure E-mails

Secure E-mails

[L]There is a weakness in the PHP e-mail script in the previous chapter. -------------------------------------------------------------------------------- [color=FA0309]PHP E-mail Injections[/color] First, look at the PHP code from the previous chapter: [php]

تاريخ الإضافة: 20/3/2008

زيارات: 1474