PHP – CRUD Islemler Serisi 3
- Sevdanur GENC

- Mar 20, 2015
- 1 min read
Bir onceki PHP – CRUD Islemler Serisi 2 yazisinda index.php olusumunu ve ayni zamanda CRUD islemlerinden create yapisi icin insert sql cumleciginin nasil kullanilacagi hakkinda bilgilendirdik. Bu yazimizda ise, veri tabanina add customer paneli ile kaydetmis oldugumuz tum kayitlarin goruntulenmesini sagliyor olucaz.
View customer paneli icin asagidaki komutlari kullanabilirsiniz;

view_customer.php
<?php mysql_connect("localhost","root","") or die ("could ot connect the server"); mysql_select_db("d_base") or die ("could ot connect the base"); $sql = "select * from customer"; $result = mysql_query($sql); ?> <html> <head> <title>: : View Customers Details : :</title> </head> <body> <blockquote> <h3>+ list of customers + </h3> <h3><a href = "index.php"> + home + </a></h3> <table border="1"> <?php //echo "you are in the view_customer.php"; while ($row = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>".$row<'firstname'>
."</td>"; echo "<td>".$row<'lastname'>
."</td>"; echo "<td>".$row<'address'>
."</td>"; echo "<td>".$row<'email'>
."</td>"; echo "<td><a href=\"edit_customer.php?id=".$row<'id'>
."\">+ edit +</a></td>"; echo "<td><a href=\"delete_customer.php?id=".$row<'id'>
."\">+ delete +</a></td>"; echo "</tr>"; } ?> </table> </blockquote> <body> </html> <?php mysql_close(); ?> Goruldugu gibi veri tabanimizda kaydetmis oldugumuz tum verileri view customer details panelinde listelettirmis olduk, ayni zamanda bu kayitlarin edit'lenmesi ve delete islemleri icin bir sonraki makaleleri inceleyebilirsiniz. Sirada ki ilgili makale icin ; PHP – CRUD Islemler Serisi 4: https://sevdanurgenc.com/archives/4241 Keyifli calismalar dilerim.




Comments