Posts

Showing posts from August, 2024

CRUD Operation with REST API in PHP

Image
  <?php $servername = "localhost" ; $username = "root" ; $password = "" ; $database = "test" ; //Create Connection $conn = new mysqli ( $servername , $username , $password , $database ); //Check Connection if ( $conn -> connect_error ) {     die ( "Connection Failed: " . $conn -> connect_error ); } Above File is mysqli_conn.php which is included in below Files. Below File is index.html File. <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < meta http-equiv = "X-UA-Compatible" content = "ie=edge" >     < title > PHP REST API CRUD </ title >     < link rel = "stylesheet" href = "css/style.css" > </ head > < body >     < table id = "main" bo...