Tugas Pemrograman Web 2 Prodi Informatika Unidra

Berikut aku tuliskan Tugas Pemrograman Web 2 Prodi Informatika Unidra angkatan 2013
Buatlah file berikut (copas aja biar cepet)

0.php
<html>
    <head>
        <title>0</title>
    </head>
        <body><center>
        SELAMAT DATANG
        <table border="1">
        <tr>
        <td><a href="a.php" target="_parent"><center>a</a></td>
        <td><a href="b.php" target="_parent"><center>b</a></td>
        <td><a href="c.php" target="_parent"><center>c</a></td>
        <td><a href="d.php" target="_parent"><center>d</a></td>
        </table>
    </body>
</html>

1.php
<html>
    <head>   
        <title>contoh form</title>
    </head>

<body><center>
    <form action="hasil.php" method="post" target="_parent">
   
    <label>Nama Anda</label>
        <input type="text" name="txtnama" placeholder="masukkan nama anda"></br>
    <label>Alamat Anda</label>
        <input type="text" name="txtalamat" placeholder="masukkan alamat"></br>
    <label>Pekerjaan Anda</label>
        <input type="text" name="txtpekerjaan" placeholder="masukkan pekerjaan"></br>

    <button type="submit"><i>hasil</i></button>
    </form>
   
    </center>
</body>
</html>


2.php
<html>
<head>
<title>2</title>
</head>
<body>HALAMAN 2</body
<html>


3.php
<html>
<head>
<title>3</title>
</head>
<body>HALAMAN 3</body
<html>


4.php
<html>
<head>
<title>4</title>
</head>
<body>HALAMAN 4</body
<html>

a.php
<html>
<head>
<title>a</title>
</head>
<body>HALAMAN a</body
<html>


b.php
<html>
<head>
<title>b</title>
</head>
<body>HALAMAN b</body
<html>


c,php
<html>
<head>
<title>c</title>
</head>
<body>HALAMAN c</body
<html>

d.php
<html>
<head>
<title>d</title>
</head>
<body>HALAMAN d</body
<html>


hasil.php
<?php
$txtnama=$_POST["txtnama"];
$txtalamat=$_POST["txtalamat"];
$txtpekerjaan=$_POST["txtpekerjaan"];
    echo $txtnama;
    echo "</br>";
    echo $txtalamat;
    echo "</br>";
    echo $txtpekerjaan;
?>


index.php
<html>
    <head>
        <meta charset="utf-8">
        <title>index</title>
    </head>

    <frameset border="2" rows="30%,65%,5%">
    <frame src="0.php">
    <frameset cols="18%,*,18%">
        <frame src="1.php">
        <frame src="2.php">
        <frame src="3.php">
    </frameset>
    <frame src="4.php" >
    </frameset>
</html>


setelah semua file diatas jadi, copas ke xamp/htdoc, kemudian panggil dari browser (pastikan apache sudah jalan)


ok, terima kasih


Post a Comment

0 Comments