Tuesday, June 26, 2018

Lecture 1 "PHP". Building Dynamic websites. Harvard OpencourseWare. CS75

Summary: This is the first lecture of the series. Building Dynamic Websites by Harvard OpenCourseWare with Great Instructor David J. Malan

Video: Lecture 1 "PHP". Building Dynamic websites




HarvardOpencourseWare. CS75

Video Run Time:

Course Web Site by CS75.tv
Course Sillabus (Opens in a PDF)
Lecture Slides for Lecture 1 (Opens in a PDF)
Codes (Opens in a PDF)
Recitation is instructed by his TA.
Recitation Slides (Opens in a PDF)
Recitation source codes have been archived in github repository

PHP programming starts at 58:55 You can click this link to jump to right there.
PHP manual


Lecture 0: HTTP
Lecture 2: PHP, Continued
Lecture 3: MVC, XML
Lecture 4: SQL
Lecture 5: SQL, Continued
Lecture 6: JavaScript
Lecture 7: Ajax
Lecture 8: Security
Lecture 9: Scalability

=======================================

PHP Super Globals

$_COOKIE
$_ENV
$_FILES
$_GET
$_POST
$_REQUEST
$_SERVER
$_SESSION
{ background-color: #00b33c; }



I'm reading "how to set up subdomains in windows environment" to supplement the info provided in this lecture.





/* 
*  Lecture #1
*  Code 1
*/
/* register.html */
<!DOCTYPE html>

<html>

  <head>
    <title>Registration</title>
  </head>
  <body>
    <div style="text-align: center">
      <h1>Registration</h1>
      <form action="http://localhost/scripts/src1/register.php" method="get">
        Name: <input name="name" type="text">
        <br>
        Gender: <input name="gender" type="radio" value="M">M <input name="gender" type="radio" value="F">F
        <br>
        <select name="state">
        <option value="CT">CT</option>
        <option value="MA">MA</option>
        </select>
        <br>
        <input type="submit" value="Register!!!">
      </form>
    </div>
  </body>
</html>

/* register.php */
<!DOCTYPE html>

<html>
  <head>
    <title>Registered!</title>
  </head>
  <body>
    <h1>Hello, <?php = htmlspecialchars($_GET['name']) ?>!</h1>
    <h1>You are a <?php = htmlspecialchars($_GET['gender']) ?></h1>
    <h1>You are from <?php = htmlspecialchars($_GET['state']) ?></h1>
  </body>
</html>
a






1 comment:

  1. I'm reading this post...
    https://medium.com/@kierancyco/developing-php-on-windows-xampp-make-a-local-subdomain-for-new-projects-e15cef57c555

    ReplyDelete

MIT 6.00 コンピュータサイエンスとプログラミング秋期講座第2回

  MIT 6.00 コンピュータサイエンスとプログラミング秋期講座第2回 オープンコースウエア 大学名:MIT 講座名:6.00 Introduction to Computer Science and Programming Download course material ...