I created a form in PHP that utilized a simple text box, radio button and checkbox and when the user clicks the “submit” button, it “posts” the data to another PHP form and also simultaneously writes to a “data.txt” file in the “data” folder.  (I did not use “get” because it was drilled into me, when I took my webdev class in the Spring, never to use that because of security problems.)  I wanted to enable the user to create an avatar, and because I’m working on a documentary on figure skaters, I wanted to have the avatar be a skater.  I started to draw a body and outfit and quickly realized that it would take way too long to do for this assignment (plus I’m not good at drawing), so I chose some photos of skaters online instead.  The Processing sketch loads the”data.txt” file and then splits the data into individual strings – this part is working fine now, thanks to help from Dan.  I then created buttons with conditional statements to map the user input, based on gender and whether the user chooses “medal”, to the appropriate image (there are four options).  This is working fine locally but isn’t updating properly on the browser…will aim to troubleshoot this tomorrow.   CLICK HERE to go to the PHP form.

« »