PHP Classes

File: user/insert.php

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Simple PHP Blog Script   user/insert.php   Download  
File: user/insert.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Simple PHP Blog Script
Manage blog articles stored in a MySQL database
Author: By
Last change:
Date: 1 year ago
Size: 395 bytes
 

Contents

Class file image Download
<?php
   
include '../include/db.php';
   
$first = $_POST['first'];
   
$last = $_POST['last'];
   
$username = $_POST['username'];
   
$password = $_POST['password'];

   
$query = mysqli_query($con, "INSERT INTO user(first, last, username, password) VALUES('$first', '$last', '$username', '$password') ") or die();
    if (
$query) {
       
header("location: login.php");
    }
    else{
        echo
"error";
    }

?>