The functions in PHP to connect to a database and add data to it is very similar to what I've learned in 4630 with the MVC model.
mysqli_connect() - this function opens a connection between the PHP script and MySQL server so they can communicate. There are 4 important information that is needed to connect to the server database: locati0n of the database, username, password, and database name
mysqli_close() - this closes the connection to the database
mysqli_query() - this function executes the sql statement contains within the PHP code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment