HW 2 – PHP calculator

for this assignment, I decided to create a form in which the user would tell about their day. Was their day good or bad? The user can also read about other people’s days.

Right now (end of the semester) I went back to this assignment to try and make the database connection work. I have a table in mysql database and I am able to manually add data into it. I also managed to get a database connection but when the form is filled out, no lines are added to the table.

This is my code, I would appreciate any help:

form.php

<?php
$id = $_POST [“id”];
$name = $_POST[“yourname”];
$date = $_POST[“date”];
$food = $_POST[“general”];
$howwasit= $_POST[“howwasit”];

?>
<html>
<head>
<title>HOW WAS YOUR DAY?</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<style type=”text/css”>
.inputbtn {
font-family: “Trebuchet MS”, Arial, Helvetica, sans-serif;
font-size: 18px;
color: #FFF;
background-color: #000;
}
.title {
font-family: “Lucida Sans Unicode”, “Lucida Grande”, sans-serif;
}
</style>
</head>
<input id=”date” name=”date”readonly>
<script type=”text/javascript”>
document.getElementById(‘date’).value = Date();
</script>

<form name=”input” form action=”process.php” method=”post”>
<h1>We all have our days,<br/> HOW WAS YOUR DAY? </h1>
<body bgcolor=”#F5F9BC” centermargin=”100″ topmargin=”100″ marginwidth=”50″ marginheight=”50″>
<p><span class=”title”>Your Name</span>
<input type=”text” name=”yourname”><br/><br/>
<span class=”title”>In general </span><br/><input type=”radio” name=”general” value=”good”>
<span class=”title”>good
</span><br/><input type=”radio” name=”general” value=”bad”>
<span class=”title”>bad </span><br/><br/>

<span class=”title”>Let’s hear more about it! </span><br/>
<textarea name=”howwasit” cols=”50″ rows=”5″></textarea>
<br/>
<input type=”submit” class=”inputbtn” value=”Tell Us”>
</p>
<p>&nbsp;</p>
<p>
<input type=”reset” value=”Clear”>
</p>
<p>&nbsp;</p>
<p><br/>
<h1>Let’s see what other people’s day was like</h1><br/>
</p>

</form>
</body>
</html>

 

 

process.php

<?php
$id = $_POST [“id”];
$name = $_POST[“yourname”];
$date = $_POST[“date”];
$food = $_POST[“general”];
$howwasit= $_POST[“howwasit”];

?>
<html>
<head>
<title>HOW WAS YOUR DAY?</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<style type=”text/css”>
.inputbtn {
font-family: “Trebuchet MS”, Arial, Helvetica, sans-serif;
font-size: 18px;
color: #FFF;
background-color: #000;
}
.title {
font-family: “Lucida Sans Unicode”, “Lucida Grande”, sans-serif;
}
</style>
</head>
<input id=”date” name=”date”readonly>
<script type=”text/javascript”>
document.getElementById(‘date’).value = Date();
</script>

<form name=”input” form action=”process.php” method=”post”>
<h1>We all have our days,<br/> HOW WAS YOUR DAY? </h1>
<body bgcolor=”#F5F9BC” centermargin=”100″ topmargin=”100″ marginwidth=”50″ marginheight=”50″>
<p><span class=”title”>Your Name</span>
<input type=”text” name=”yourname”><br/><br/>
<span class=”title”>In general </span><br/><input type=”radio” name=”general” value=”good”>
<span class=”title”>good
</span><br/><input type=”radio” name=”general” value=”bad”>
<span class=”title”>bad </span><br/><br/>

<span class=”title”>Let’s hear more about it! </span><br/>
<textarea name=”howwasit” cols=”50″ rows=”5″></textarea>
<br/>
<input type=”submit” class=”inputbtn” value=”Tell Us”>
</p>
<p>&nbsp;</p>
<p>
<input type=”reset” value=”Clear”>
</p>
<p>&nbsp;</p>
<p><br/>
<h1>Let’s see what other people’s day was like</h1><br/>
</p>

</form>
</body>
</html>

 

response to ‘Out in Public’

Prior to reading this interview with Natalie Bookchin, I was not familiar with her work,
although it’s right up my alley and really suited the state of mind I am in right now.
I found some of her projects very powerful and engaging, and I tend to be drawn to that type of obsessive anthropological documentary exploring the times we live in.

What I liked most of all and couldn’t put in words until she did it herself, was that unlike other artists who visualise data gathered from the internet, she brings out the individual story. In her works, the individual is not another abstract dot on a map, but has a voice. This voice is heard within a choir, but it is heard.

 

week 2 HW – PHP calculator

This is my “How was your day” page that is now only generating one response.

This week, I feel that I learned some php lessons while moving from one host to another.
I didn’t realise a backup was so crucial and my blog was down for a few days. I then learned how to create a database and connect to it, and also that there is a file called .htacces that the mac hides while copying the files and I then had to re-create.

My goal for next week is to set up the database and to display people’s answers at the bottom of the first screen.
Also, I want to make a menu on this url that would organise all my comm lab web homework.

 

 

The web I didn’t realize I lost

Reading Anil Dash’s “The Web We Lost” and the sequel “Rebuilding the web we lost”, I learned about parts of web history that I was not aware of, even though I have been living the web since MIRC times. For example, Technorati is a platform that I had no idea of.

During our recent applications class, Nancy mentioned the “Boiling a Frog” analogy. I think this analogy applies to Some of the changes in the way things are in the internet world. Some things, like the monetization of links, were gradual and grew on us.

I agree with Dash’s perspective. While the article seemed as a regular “Things were better in the past” rant at first glance, it does make some good points to consider when we continue to build the future of the web.

One of the things I like most about the web, is how rapidly things can change and how much power one individual can have in their hands. There could be a new product tomorrow that will change the rules of play completely. Until Google or Facebook buys it.

The web I knew

The web I knew