I have searched on google for this and cannot seem to find what i am looking for, so please forgive me if this is duplicated or answered before... And im a beginner in web design and programming...
I am trying to create new divs above an existing Div and to push the older div down the page,How would i do this effectively, should i use PHP, Javascript or CSS. It is for a comments section, I know i need a database to save comments but all i am trying to do at the moment is to create repeating Divs that flow down the page upon submit.
HTML & PHP:
<html>
<head>
<title>PHP Test</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<h2><u>Interactive</u></h2>
Let us and others know your thoughts on this subject...
<br />
<h3>Thoughts:</h3>
<div id="form">
<form action="" method="post" >
<textarea name="Comments" rows="8" cols="40" value="" ></textarea>
<input type="submit" value="Submit" name="submit" onclick="location.href='test.php'" />
</form>
</div>
<div id="Quotes">
In this section, will be where your thoughts are displayed for others to see...
<?php
$comments = $_REQUEST ['Comments'];
echo "<div id='comment'>".$comments."</div>";
?>
</div>
</div>
</body>
</html>
CSS:
body {
}
#wrapper {
margin: 0 auto;
width: 500px;
border: 1px solid black;
}
#comment {
border: 1px solid black;
padding: 5px;
margin: 5px;
text-align: center;
}
This is where i am at currently.