<html>
<body>
<form action="display.php" method="POST">
Name: <br>
<input type="text" name="user">
<br>
Address: <br>
<textarea name="address" rows="5" cols="40"></textarea>
<br>
Select languages: <br>
<select name="languages[]" multiple >
<option>C</option>
<option>Java</option>
<option>ORACLE </option>
<option>VB.NET</option>
</select>
<input type="submit" value="Submit">
</form>
</body>
</html>
Display.php
<?php
if(isset($_POST['user']))
{
print "Welcome ".$_POST['user']."<br>";
print "Your address is:".nl2br($_POST['address'])."<br>";
print "Your language choices are:<br>";
foreach ($_POST['languages'] as $value) {
print "$value<br>";
}
print $str;
}
?>
so sweet
ReplyDeleteAlgorithms Code Examples
ReplyDelete