belajar menjadi developer web
TRANSCRIPT
Hal Awal yang Harus di Pahami?
INI AWAL!!
Belajar Menjadi Developer Belajar Menjadi Developer WebWeb
Mulai dari mana?Mulai dari mana?
Kerja Server Kerja Server WebWebSisi Seorang Programmer
sekarangsekarang
Menghubungkan PHP dan MySQL?
Bagaimana HTML dan PHP menjadikan website dinamis?
HTML 1HTML 1
<html> <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> <title>LatihanMIT</title> </head>
<body>
<h1>Tes Lempar Variable menggunakan GET dan POS</h1> <h2> Post form</h2> <form method="post" action="pos_get2.php"> text:<input type="text" size =40 name="nama_bla"> <input type=submit value="Submit Post"> </form> <h2> GET form</h2> <form method="get" action="pos_get2.php"> text:<input type="text" size =40 name="nama_blu"> <input type=submit value="Submit Get" > </form>
</body> </html>
GET?GET?
POST?POST?
FORM?FORM?
Bag
aim
an
B
ag
aim
an
m
en
an
gkap
nya?
men
an
gkap
nya?
<html> <head> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"> <title>Latihan saja</title> </head> <body> <h1>nangkep saja</h1>
<? if($_GET['nama_blu']) { $name = $_GET['nama_blu']; } echo($name);
if($_POST['nama_bla']) { $name = $_POST['nama_bla']; } echo($name);
?> <p> <a><input type="button" value="back" onclick="history.go(-1)"></a> </p>
</body> </html>
MYSQL & PHPMYSQL & PHP
$koneksi=mysql_connect("localhost","root","") or die ("gagal euy");
mysql_select_db("databuoy",$koneksi);
$kueri=mysql_query('select * from data limit 0,30');
$row=mysql_fetch_array($kueri)
ContohContoh <?$koneksi=mysql_connect("localhost","root","") or die ("gagal euy");echo "sukses";echo "<br>";mysql_select_db("databuoy",$koneksi);
$kueri=mysql_query('select * from data limit 0,30'); ?><table width="500" border="1"><tr bgcolor="#0066FF"> <td>Nomor</td> <td>Tanggal/Jam</td> <td>ID BUOY</td> <td>SUHU (Celcius)</td> <td>ARAH ANGIN (Derajat)</td> <td>KEC ANGIN (m/s)</td> </tr><?while($row=mysql_fetch_array($kueri)){ ?> <tr> <td><?php echo $row['noid']; ?></td> <td><?php echo $row['tanggaljam']; ?></td> <td><?php echo $row['buoy']; ?></td> <td><?php echo $row['suhu']; ?></td> <td><?php echo $row['arah_angin']; ?></td> <td><?php echo $row['kec_angin']/4000 * 15; ?></td> </tr><? } ;?> </table>
selanjutnya?selanjutnya?