
kod źródłowy: formularz.html
Kod
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<title> nowa strona<title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
</head>
<body>
<form action="przetworzzamowienie.php" method=post>
<table border=0>
<tr bgcolor="#cccccc">
<td width="150">Produkty</td>
<td width="20">Ilość</td>
</tr>
<tr>
<td>Opony</td>
<td align="center"><input type="text" name="iloscopon" size="3" maxlength="3"/></td>
</tr>
<tr>
<td>Olej</td>
<td align="center"><input type="text" name="iloscoleju" size="3" maxlength="3"/></td>
</tr>
<tr>
<td>świece</td>
<td align="center"><input type="text" name="iloscswiec" size="3" maxlength="3"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="złóż zamówienie"/></td>
</tr>
</table>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<title> nowa strona<title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
</head>
<body>
<form action="przetworzzamowienie.php" method=post>
<table border=0>
<tr bgcolor="#cccccc">
<td width="150">Produkty</td>
<td width="20">Ilość</td>
</tr>
<tr>
<td>Opony</td>
<td align="center"><input type="text" name="iloscopon" size="3" maxlength="3"/></td>
</tr>
<tr>
<td>Olej</td>
<td align="center"><input type="text" name="iloscoleju" size="3" maxlength="3"/></td>
</tr>
<tr>
<td>świece</td>
<td align="center"><input type="text" name="iloscswiec" size="3" maxlength="3"/></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="złóż zamówienie"/></td>
</tr>
</table>
</form>
</body>
</html>
kod źródłowy: przetworzzamowienie.php
Kod
<html>
<head>
<title>Części samochodowe, wynik zamówienia</title>
</head>
<body>
<h2>wyniki</h2>
<?php
$iloscopon = $_POST['iloscopon'];
$iloscoleju= $_POST['iloscoleju'];
$iloscoleju= $_POST['iloscswiec'];
?>
<?php
echo '<p>zamówienie</p>';
echo $iloscopon. 'opon <br/>';
echo $iloscoleju. 'butelek <br/>';
echo $ilosc swiec. 'świec <br/>':
echo '<p>Zamówieie przyjęte o';
echo date('H:i, j C Y');
echo '</p>';
?>
</body>
</html>
<head>
<title>Części samochodowe, wynik zamówienia</title>
</head>
<body>
<h2>wyniki</h2>
<?php
$iloscopon = $_POST['iloscopon'];
$iloscoleju= $_POST['iloscoleju'];
$iloscoleju= $_POST['iloscswiec'];
?>
<?php
echo '<p>zamówienie</p>';
echo $iloscopon. 'opon <br/>';
echo $iloscoleju. 'butelek <br/>';
echo $ilosc swiec. 'świec <br/>':
echo '<p>Zamówieie przyjęte o';
echo date('H:i, j C Y');
echo '</p>';
?>
</body>
</html>