DB other operation
摘要:A prepared statement is a feature used to execute the same/similar SQL statement repeatedlly with high efficiency. Prepared statement basically work l
阅读全文
DB Create and Insert
摘要:<?php $servername = "localhost"; $username = "username"; $password = "password"; $conn = new mysqli($servername, $username, $password); if($conn -> co
阅读全文
Connection to DB
摘要:Connect to MySQL PHP5 and later can work with a MySQL database using MySQLi extension PDO PDO will work on 12 different database systems, where as MyS
阅读全文
Error Handling and Exception
摘要: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 Filter
摘要:PHP filters are used to validate and sanitize external input. Validating data is determine if the data is in proper form. Sanitizing data is remove an
阅读全文
Session
摘要:A session is a way to store information(in variables) to be used across multiple pages.Unlike a cookie, the information is not stored on the users com
阅读全文
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
阅读全文
File
摘要:The readfile() functin reads a file and writes it to the output buffer. readfile('filename') A better method to open files is with the fopen() functio
阅读全文
Include and Require
摘要:The include or require statement takes all the text/codde/markup that exists in the specified file and copies it into the file that uses the include s
阅读全文
Date and Time
摘要:The PHP date() function is used to format date and/or a time and formats as timestamp to a more readable data and time. date(format, timestamp) //form
阅读全文
Arrays Multi
摘要:<!DOCTYPE html><html><body><?php$cars = array ( array("Volvo",22,18), array("BMW",15,13), array("Saab",5,2), array("Land Rover",17,15) );for ($row = 0
阅读全文
PHP Forms
摘要:<html><body><form action="welcome.php" method="post">Name: <input type="text" name="name"><br>E-mail: <input type="text" name="email"><br><input type=
阅读全文
simple grammer
摘要:<?phpecho strlen("Hello world!"); // outputs 12?> <?phpecho str_word_count("Hello world!"); // outputs 2?> <?phpecho strrev("Hello world!"); // output
阅读全文