PHP and MySQL PDF
PHP and MySQL PDF
1
PHP and MYSQL
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
Course Module
Close the Connection
The connection will be closed automatically when the script ends. To
close the connection before, use the following:
$conn->close();
Connecting to database
Web Development
3
PHP and MYSQL
Course Module
Passing data
Web Development
5
PHP and MYSQL
Course Module
Adding row
Web Development
7
PHP and MYSQL
Course Module
Web Development
9
PHP and MYSQL
Deleting rows
Course Module
Web Development
11
PHP and MYSQL
Changing data
Course Module
Web Development
13
PHP and MYSQL
Course Module
Populate option list
Web Development
15
PHP and MYSQL
Login validation
Course Module
Web Development
17
PHP and MYSQL
References
Murach, J. (2014) Murach’s PHP and MYSQL (2nd Edition)
WEBSITE
http://php.net/
http://www.w3schools.com/php/
https://www.tutorialspoint.com/php/
Course Module