Archive for May 12th, 2009

PHP Date()

The PHP date() function is used to format a time or a date.

The PHP Date() Function
The PHP date() function formats a timestamp to a more readable date and time.
Syntax

date(format,timestamp)

Parameter
Description

format
Required. Specifies the format of the timestamp

timestamp
Optional. Specifies a timestamp. Default is the current date and time (as a timestamp)

PHP Date – What is a [...]

Continue reading »

PHP $_POST

The $_POST variable is used to collect values from a form with method=”post”.

The $_POST Variable
The $_POST variable is an array of variable names and values sent by the HTTP POST method.
The $_POST variable is used to collect values from a form with method=”post”. Information sent from a form with the POST method [...]

Continue reading »

PHP $_GET

The $_GET variable is used to collect values from a form with method=”get”.

The $_GET Variable
The $_GET variable is an array of variable names and values sent by the HTTP GET method.
The $_GET variable is used to collect values from a form with method=”get”. Information sent from a form with the GET method [...]

Continue reading »

PHP Forms and User Input

The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input.

PHP Form Handling
The most important thing to notice when dealing with HTML forms and PHP is that any form element in an HTML page will automatically be available to your PHP scripts.
Form example:

<html>
<body>
<form action=”welcome.php” method=”post”>
Name: <input type=”text” name=”name” />
Age: [...]

Continue reading »