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
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 1: PHP |
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
/*
* 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
I'm reading this post...
ReplyDeletehttps://medium.com/@kierancyco/developing-php-on-windows-xampp-make-a-local-subdomain-for-new-projects-e15cef57c555