PHP My Admin Non-Government Institute Connect PHP with...
Transcript of PHP My Admin Non-Government Institute Connect PHP with...
![Page 1: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/1.jpg)
1
Aga Non-Government Institute
for Computer Science
PHP My Admin
Connect PHP with MYSQL
Open XAMPP -- > in Start Menu
http://localhost:8080
![Page 2: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/2.jpg)
2
یهر ههگهر ئهی تێپهرو ووشهكارهێنهداخل كردنی ناوی به
Databaseی زانیاری دروست كردنی بنكه
ب
بكه Createر سهی زانیاری پاشان كلیك لهداخل كردنی ناوی بنكه
![Page 3: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/3.jpg)
3
Table دروست كردنی خشته
Data typeست نیشان كردنی داتا تایپ ده
![Page 4: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/4.jpg)
4
Insert data داخل كردنی زانیاری
Browse كانپیشان دانی فیلده
![Page 5: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/5.jpg)
5
Structure
SQL
![Page 6: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/6.jpg)
6
Export
Import
![Page 7: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/7.jpg)
7
Connect PHP With MYSQL
Connection String -- ConnectionDB.php
![Page 8: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/8.jpg)
8
Insert data to MYSQL
FormAdd.php
AddDB.php
<?php include("connectionDB.php"); if(isset($_POST['Submit1'])) { $FN=$_POST['FName']; $LN=$_POST['LName']; $MN=$_POST['MName']; if(empty($FN) || empty($LN) || empty($MN)) { if(empty($FN)) { echo "<font color='red'>First Name is empty.</font><br/>"; } echo "<br/><a href='javascript:self.history.back();'>Go Back</a>"; } else { $result = mysqli_query($mysqli, "INSERT INTO Student(FName,LName,MName)VALUES('$FN','$LN','$MN')"); } } header("Location:View.php"); ?>
![Page 9: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/9.jpg)
9
View.php
<?php
include("connectionDB.php");
$countSt7=1;
$SQL_StudentGFind="SELECT * FROM student order by ID DESC";
$Result7 = mysqli_query($mysqli,$SQL_StudentGFind);
while($row7 = mysqli_fetch_assoc($Result7)) {
?>
1 2 3 4
<?php $countSt7++; }?>
1 <?php echo $row7["FName"]; ?>
2 <?php echo $row7 ["LName"]; ?>
3 <?php echo $row7 ["MName"]; ?>
4
<a href="EditForm.php?IDS=<?php echo $row7["ID"];?>">Edit</a>
<a href="Delete.php?IDS=<?php echo $row7["ID"];?>">Delete</a>
![Page 10: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/10.jpg)
10
EditForm.php
<?php echo $row1["FName"];?>
<?php echo $row1["LName"];?>
<?php echo $row1["MName"];?>
Aga Non-Government Institute
for Computer Science
![Page 11: PHP My Admin Non-Government Institute Connect PHP with …aga-pics.com/wp-content/uploads/2015/09/PHP-My-Admin.pdf · 2018-02-26 · 2 هیهه رهگهئ رهپێت یهشوو ورهنێهراكهب](https://reader033.fdocuments.in/reader033/viewer/2022043014/5fb7a881e2539752da5671b6/html5/thumbnails/11.jpg)
11
Code Edit DB
<?php include("connectionDB.php"); if(isset($_POST['Submit1'])) { $TID1=$_POST['TID']; $FN=$_POST['FName']; $LN=$_POST['LName']; $MN=$_POST['MName']; $result = mysqli_query($mysqli, "UPDATE Student SET FName='$FN',LName='$LN',MName='$MN' WHERE ID='$TID1'"); } header("Location:view.php"); ?>
Delete.php
<?php
include("connectionDB.php");
$IDS1 = $_GET['IDS'];
$result=mysqli_query($mysqli,"DELETE FROM Student Where ID=$IDS1");
header("Location:View.php");
?>