Internet
Seminar

Spring 2019
course
site

Thu Feb 28

in class

The php scripts that we wrote in class are


Walk through creating a back-end php comment poster.

First, consider a python command-line "summarize-file-and-update" programw which works like this :

$ python comments.py
1. First comment.
2. Second comment.
What is your next comment? This is another

$ python comments.py
1. First comment.
2. Second comment.
3. This is another.

The comments are stored in a file named "comments.txt", in any format you like. Can we do this? Good, let's.

Second, a php web page comment thing ... using exactly the same idea: read the file, loop over the comments, output a div tag for each, put up a form asking for another comment ... when you get one, write it to the file.

resources

take two : include user login

take three : with a database (i.e. sqlite)

The big ideas :

Your mission : put users and comments into a sqlite database, using php ....

Things to think about

https://cs.marlboro.college /cours /spring2019 /internet /notes /server1
last modified Fri March 29 2024 12:57 pm

attachments [paper clip]

  last modified size
TXT display_php.txt Fri Mar 29 2024 12:57 pm 474B
TXT handler_php.txt Fri Mar 29 2024 12:57 pm 556B