Add a new Row

Enter A Code:
Enter A Name:
Enter A Lecturer:
prepare($queryInsert); //executes the variable whith prepared query. $statement->execute(); // frees up the connection to the server so that other SQL statements may be issued $statement->closeCursor(); echo "New record created successfully"; } else{//prints error if anyting goes wrong with if statement. echo "No Record Inserted"; } } catch(PDOException $e) {//catches and prints the error to the screen if the try block fails. echo $sql . "
" . $e->getMessage(); } $conn = null; ?>

Update a Row

Enter A Code:
Enter A Lecturer:
prepare($query); //executes the variable whith prepared query. $statement2->execute(); // frees up the connection to the server so that other SQL statements may be issued $statement2->closeCursor(); echo "Record Updated successfully"; } else{//prints error if anyting goes wrong with if statement. echo "No Record Updated"; } } catch(PDOException $e){//catches and prints the error to the screen if the try block fails. echo $sql . "
" . $e->getMessage(); } $conn = null; ?>

Delete a Row

Enter A Code:
prepare($query); //executes the variable whith prepared query. $statement2->execute(); // frees up the connection to the server so that other SQL statements may be issued $statement2->closeCursor(); echo "Record Deleted successfully"; } else{//prints error if anyting goes wrong with if statement. echo "No Record Deleted!"; } } catch(PDOException $e){//catches and prints the error to the screen if the try block fails. echo $sql . "
" . $e->getMessage(); } $conn = null; ?>
prepare("SELECT * FROM modules"); $rows->execute(); }//catches any erros if connetion fails. catch(PDOException $e) { echo "Error: " . $e->getMessage(); } ?>
Code Name Lecturer