Output from variables to table data
Posted: Fri Mar 26, 2004 8:21 am
Hi!
I am trying to output data from a variable to a html table.
Here is the code anyway that takes the data from 3 html text fields and prints it out on the same page.
<html>
<head>
<body>
<?
if (isset($_POST['fnamn'])) {
echo "<table border=1> <tr> <td> Välkommen </td> </tr> </table>"
.$_POST['fnamn']."" .$_POST['enamn']. /* This line prints out the surname and last name of the person, I want this name into a html table data*/
"!<br>";
echo " Du gillar att ".$_POST['intresse'].""; // this into table as well
}
?>
<form action="sida1.php" method="post">
Förnamn: <input type="text" name="fnamn">
<br>
Efternamn: <input type="text" name="enamn">
<br>
Intresse: <input type="text" name="intresse">
<br>
<input type="submit" value="Ok!">
</form>
</body>
</head>
</html>
How should I change my program to do this?
Very thanks to anyone who can help me!
I am trying to output data from a variable to a html table.
Here is the code anyway that takes the data from 3 html text fields and prints it out on the same page.
<html>
<head>
<body>
<?
if (isset($_POST['fnamn'])) {
echo "<table border=1> <tr> <td> Välkommen </td> </tr> </table>"
.$_POST['fnamn']."" .$_POST['enamn']. /* This line prints out the surname and last name of the person, I want this name into a html table data*/
"!<br>";
echo " Du gillar att ".$_POST['intresse'].""; // this into table as well
}
?>
<form action="sida1.php" method="post">
Förnamn: <input type="text" name="fnamn">
<br>
Efternamn: <input type="text" name="enamn">
<br>
Intresse: <input type="text" name="intresse">
<br>
<input type="submit" value="Ok!">
</form>
</body>
</head>
</html>
How should I change my program to do this?
Very thanks to anyone who can help me!