browniejbb
Technical User
hi, ive just recently started learning php so please go easy on me!
im trying to create a page whereby a visitor can type in their favourite song, say, (this is just an example) and their favourite artist, along with their name and homepage.
Once they have submitted this data, i would like it to come up in a table underneath the form.
i have managed to do this using :
<html>
<head>
<title>musicform
</title>
</head>
<body>
<form action="musicform.php" method="POST">
Your name: <input type="text" name="name" />
Your url: <input type="text" name="url" />
The song: <input type="text" name="song" />
The artist: <input type="text" name="artist" />
<input type="submit" value="tell me">
</form>
<br>
<table border="0">
<tr>
<th>Name
<th>Url
<th>Song
<th>Artist
</tr>
<tr>
<td><?php echo $_POST["name"]; ?><br>
</td>
<td><a href="<?php echo $_POST["url"]; ?>"><?php echo $_POST["url"]; ?></a><br>
</td>
<td><?php echo $_POST["song"]; ?><br>
</td>
<td><?php echo $_POST["artist"]; ?><br>
</td>
</tr>
<table>
</body>
</html>
however i would like the data then to stay in that table, so that when the next visitor arrives they can input their data into a new row of the table. can i do this without having to create a database?
sorry if that was a long question!
thanks to all : )
im trying to create a page whereby a visitor can type in their favourite song, say, (this is just an example) and their favourite artist, along with their name and homepage.
Once they have submitted this data, i would like it to come up in a table underneath the form.
i have managed to do this using :
<html>
<head>
<title>musicform
</title>
</head>
<body>
<form action="musicform.php" method="POST">
Your name: <input type="text" name="name" />
Your url: <input type="text" name="url" />
The song: <input type="text" name="song" />
The artist: <input type="text" name="artist" />
<input type="submit" value="tell me">
</form>
<br>
<table border="0">
<tr>
<th>Name
<th>Url
<th>Song
<th>Artist
</tr>
<tr>
<td><?php echo $_POST["name"]; ?><br>
</td>
<td><a href="<?php echo $_POST["url"]; ?>"><?php echo $_POST["url"]; ?></a><br>
</td>
<td><?php echo $_POST["song"]; ?><br>
</td>
<td><?php echo $_POST["artist"]; ?><br>
</td>
</tr>
<table>
</body>
</html>
however i would like the data then to stay in that table, so that when the next visitor arrives they can input their data into a new row of the table. can i do this without having to create a database?
sorry if that was a long question!
thanks to all : )