Putting it all together: Using PhP with MySQL

Following is a brief summary of some of the concepts on PhP and MySQL that we have covered in class:

Here are some notes about writing and running PhP with MySQL on i5.nyu.edu:

  1. Your_php_script must be located in public_html/cgi-bin
  2. The first line of your PHP script has the directive: #!/usr/local/bin/php
  3. Use chmod 755 <filename.php> in order for it to be world-executable.
  4. Your database name is the same as your netid.

Examples in Class: (based on these scripts: composers_script.sql, and recordings_script.sql

Source file for php_mysql*.php files: This is stored as a Word document so that the browser does not interpret it.