Created
June 2, 2015 23:33
-
-
Save heriipurnama/781fa1a0069387de7282 to your computer and use it in GitHub Desktop.
UX user WEb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<?php | |
echo"<form action=' ' method='get'> | |
Nama : <input type='text' name='nama' > <br> | |
Jumlah Anak : <input type='text' name='jum'><br> | |
<input type='submit' name='proses' value='Oke'> | |
</form>"; | |
if(isset($_GET['jum'])){ | |
$jum = $_GET['jum']; | |
$nama = $_GET['nama']; | |
echo "<form action='tugas.php' method='get'>"; | |
echo"<input type='text' name='jumku' value=$jum><br>"; | |
echo"<input type='text' name='nama' value=$nama><br><br>"; | |
for ($i=1; $i <= $jum ; $i++) { | |
echo "Nama Anak ke $i = <input type='text' name='juml[$i]'> <br>"; | |
} | |
echo "<input type='submit' name='proses1' value='Proses Anak'>"; | |
echo "</form>"; | |
} | |
?> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nama=$_GET['nama']; | |
$jumku=$_GET['jumku']; | |
$juml=$_GET['juml']; | |
echo"======Data Yang Dimasukkan=====<br>"; | |
echo"Nama : $nama<br>"; | |
echo "Jumlah Anak :$jumku Orang <br><br>"; | |
foreach ($juml as $jumlq) { | |
echo "Nama Anak :$jumlq <br>"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment