SYS 2202 Lecture Notes - Lecture 11: Language Construct, Database Server, Query String

38 views1 pages

Document Summary

Extract tuples from result of queries i. ii. iii: close connection with finished b. c. d. e. f. To connect: mysqli_connect(hostname, username, password, database: use localhost as hostname if web and database server are on the same machine. Submit a query using: mysqli_query(connection resource, query string: returns resource containing query result. Extract tuples from result: mysqli_fetch_assoc which returns a tuple as an associative array and once its done fetching all tuples, returns empty result. Echo: not actually a function bur a language construct, so not required to use parenthesis. Echo: output content to the browser by sending that data to the server which sends it back to the browser as plain html a. b. Html forms and php: any form element in an html page will automatically be available to php scripts. Validate form on server: post the form to itself so rather than jumping to another page, an error will be returned.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers