Advertisement
Guest User

Untitled

a guest
Nov 15th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.61 KB | None | 0 0
  1. <?php
  2.  
  3. global $connection;
  4.  
  5.  if(isset($_POST['create_user'])){
  6.            
  7.  
  8. $user_firstname = $_POST['user_firstname'];  
  9. $user_lastname= $_POST['user_lastname'];
  10. $user_role = $_POST['user_role'];
  11.  
  12. //$post_image = $_FILES['image']['name'];
  13. //$post_image_temp = $_FILES['image']['tmp_name'];
  14.  
  15. $username= $_POST['username'];
  16. $user_email = $_POST['user_email'];
  17. $user_password = $_POST['user_password'];
  18. $date=date('d-m-y');
  19. //$post_comment_count = 4;
  20.  
  21.      
  22. //     move_uploaded_file($post_image_temp, "../images/$post_image");
  23.          
  24. //        
  25. //   $query = " INSERT INTO posts (post_category_id,post_title, post_author,post_date, post_image, post_content, post_tags, post_status) ";
  26. //    
  27. //$query .= "VALUES({$post_category_id},'{$post_title}','{$post_author}','{$post_date}', '{$post_image}','{$post_content}','{$post_tags}','{$post_status}')";
  28. //
  29. //  $create_post_query = mysqli_query($connection,$query);    
  30. //                
  31. //  if(!$create_post_query) {
  32. //       die('QUERY FAILED'.mysqli_error($connection));
  33. //            }  
  34. //
  35. //     header("Location:posts.php");
  36. // }
  37. //
  38.  
  39.  
  40. ?>
  41.  
  42.  
  43.  
  44. <form action="" method="post" enctype="multipart/form-data">
  45.  
  46.   <div class="form-group">
  47.    <label for="user_firstname">Firstname</label>  
  48.     <input type="text" class="form-control" name="user_firstname">
  49.      
  50.   </div>
  51.      
  52.          <div class="form-group">
  53.    <label for="post_author">Lastname</label>  
  54.     <input type="text" class="form-control" name="user_lastname">
  55.      
  56.   </div>    
  57.          
  58.      
  59.      
  60.       <div class="form-group">
  61.    <label for="post_title">Post Category</label>
  62.    <div>
  63.      <select name="post_category" id="">
  64.      <option value="Subscriber">Select options </option>
  65.       <option value="admin">Admin</option>
  66.          <option value="Subscriber">Subscriber</option>
  67.      
  68.   </select>
  69. </div>
  70.    
  71.        
  72.      
  73.    
  74.      
  75.      
  76.       <div class="form-group">
  77.    <label for="username">Username</label>  
  78.     <input type="text" class="form-control" name="username">
  79.      
  80.   </div>    
  81.      
  82.      
  83.       <div class="form-group">
  84.    <label for="user_email">Email</label>  
  85.     <input type="email" class="form-control" name="user_email">
  86.      
  87.   </div>    
  88.      
  89.      
  90.      <div class="form-group">
  91.    <label for="post_tags">Password</label>  
  92.     <input type="password" class="form-control" name="user_password">
  93.      
  94.   </div>    
  95.      
  96.        
  97.      <div class="form-group">
  98.    
  99.     <input class="btn btn-primary" type="submit" name="create_user" value="add_user">
  100.      
  101.   </div>    
  102.      
  103.  
  104.     </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement