INSERT RECORD INTO DATABASE BY PHP IN WEBPAGE 1. INSERT RECORD ( insert.php ) <!DOCTYPE html> <html> <body> <form method="post" action="insert1.php"> Employ ID:<br> <input type="text" name="eid"> …
Read moreDISPLAY DATA FROM DATABASE TABLE BY PHP DISPLAY DATA FROM EMP TABLE ( retrieve.php) <?php include_once 'database.php'; $result = mysqli_query($con,"SELECT * FROM emp"); ?> <!DOCTYPE html> <html> <head> <title> Retrive data</title> <link rel="stylesheet" href…
Read moreCSS FILE CREATION IN HTML (style.css ) table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: white; } ========================================
Read moreCONNECTION BETWEEN PHP AND MYSQL ( Connection to the MySQL server) 1. Connection to the MySQL server in PHP (database.php) <?php $servername='localhost'; $username='root'; $password=''; $dbname = "pan1"; $con=mysqli_connect($servername,$username,$password,"$dbname"); …
Read moreSTATIC FUNCTION Any method declared as static with the static keyword. Accessible without the creation of an object. Associated with the class, not an instance of the class. Permitted to access only static methods and static variables. Syntax <?php class ClassName { public static function staticMethod() { echo "Hello World!&quo…
Read more
Social Plugin