Skip to main content

Posts

Featured

create table --------------- <?php $link = mysqli_connect("localhost", "root", "", "php_example"); // Check connection if($link === false){     die("ERROR: Could not connect. " . mysqli_connect_error()); } // Attempt create table query execution $sql = "CREATE TABLE student(     id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,     name VARCHAR(30) NOT NULL,     department VARCHAR(30) NOT NULL,     courses VARCHAR(70) NOT NULL )"; if(mysqli_query($link, $sql)){     echo "Table created successfully."; } else{     echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } // Close connection mysqli_close($link); ?>--------------------------------------------------------------------------------------------------------------------- dbconfigure __________ <?php // Database configuration $dbHost     = "localhost"; $dbUsername = "root"; $dbPasswo...

Latest Posts