Here you can find many examples of how to use php simply and effectively
Please take a look at the below examples to help you get started on that next php project.
Example of Directory Listing
This example explores how to present the user with a list of available files. It uses the time and date stamp as the sort order and as the link name.
Click Here to see this example Code
Example of Verify User Name
This example explores how to verify that a valid user is attempting to logon. This is a simple method that should only be used when working on an intranet, and security is not a major concern.Click Here to see this example Code
Example of Form Response
This example explores how to use php to provide a form response. This is a simple method that could be used to execute a system program to collect and provide the results in a temporary file. PHP would then display the resulting file.
Click Here to see this example Code
Example of how to Create a SQLite Database
This example explores how to use php to create a simple sqlite database.
$db = new SQLiteDatabase(".\\users.sqlite");
Example of how to Open a SQLite Database
This example explores how to use php to open a simple sqlite database.
$conn = sqlite_open(".\\users.sqlite");
Example of how to Create a table in a SQLite Database
This example explores how to use php to open a simple sqlite database.
$conn = sqlite_open(".\\users.sqlite");
sqlite_query($conn ,
"CREATE TABLE myusers " .
"(id INTEGER PRIMARY KEY," .
"Name CHAR(255)," .
"Password CHAR(255))");
Example of how to add data to a table in a SQLite Database
This example explores how to use php to add data to a table in a simple sqlite database.
$conn = sqlite_open(".\\users.sqlite");
sqlite_query($conn,
"INSERT INTO myusers (" .
"Name," .
"Password" .
") VALUES (" .
"'JohnDoe1'," .
"'MySillyPassword'" .
")");
Example of how to list data in a table in a SQLite Database
This example explores how to use php to list data in a table in a simple sqlite database.
$conn = sqlite_open(".\\users.sqlite");
$result = sqlite_query($conn,"SELECT * FROM myusers");
while ($row = sqlite_fetch_array($result)) {
print_r($row);
print_r("<BR>\n");
}
Example of how to close a SQLite Database
This example explores how to use php to close a sqlite database.
unset($conn);












