Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $connection;
- if(isset($_POST['create_user'])){
- $user_firstname = $_POST['user_firstname'];
- $user_lastname= $_POST['user_lastname'];
- $user_role = $_POST['user_role'];
- //$post_image = $_FILES['image']['name'];
- //$post_image_temp = $_FILES['image']['tmp_name'];
- $username= $_POST['username'];
- $user_email = $_POST['user_email'];
- $user_password = $_POST['user_password'];
- $date=date('d-m-y');
- //$post_comment_count = 4;
- // move_uploaded_file($post_image_temp, "../images/$post_image");
- //
- // $query = " INSERT INTO posts (post_category_id,post_title, post_author,post_date, post_image, post_content, post_tags, post_status) ";
- //
- //$query .= "VALUES({$post_category_id},'{$post_title}','{$post_author}','{$post_date}', '{$post_image}','{$post_content}','{$post_tags}','{$post_status}')";
- //
- // $create_post_query = mysqli_query($connection,$query);
- //
- // if(!$create_post_query) {
- // die('QUERY FAILED'.mysqli_error($connection));
- // }
- //
- // header("Location:posts.php");
- // }
- //
- ?>
- <form action="" method="post" enctype="multipart/form-data">
- <div class="form-group">
- <label for="user_firstname">Firstname</label>
- <input type="text" class="form-control" name="user_firstname">
- </div>
- <div class="form-group">
- <label for="post_author">Lastname</label>
- <input type="text" class="form-control" name="user_lastname">
- </div>
- <div class="form-group">
- <label for="post_title">Post Category</label>
- <div>
- <select name="post_category" id="">
- <option value="Subscriber">Select options </option>
- <option value="admin">Admin</option>
- <option value="Subscriber">Subscriber</option>
- </select>
- </div>
- <div class="form-group">
- <label for="username">Username</label>
- <input type="text" class="form-control" name="username">
- </div>
- <div class="form-group">
- <label for="user_email">Email</label>
- <input type="email" class="form-control" name="user_email">
- </div>
- <div class="form-group">
- <label for="post_tags">Password</label>
- <input type="password" class="form-control" name="user_password">
- </div>
- <div class="form-group">
- <input class="btn btn-primary" type="submit" name="create_user" value="add_user">
- </div>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement