Advertisement
Guest User

Untitled

a guest
May 29th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1. <?php
  2. include '../_class/mycms_class.php';
  3.  
  4. $obj = new myCMS();
  5.  
  6. // Connection Variables
  7. $obj->host = 'localhost';
  8. $obj->username = 'camerong';
  9. $obj->password = 'PASSWORD HERE';
  10. $obj->db = 'camerong_mycms';
  11.  
  12. //Connect to datbase
  13. $obj->connect();
  14. ?>
  15. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  16. <html>
  17. <head>
  18.   <meta content="text/html; charset=ISO-8859-1"
  19.  http-equiv="content-type">
  20.   <title>My CMS - Alpha</title>
  21. </head>
  22. <body>
  23. <div id="pagecontent">
  24. <form method="post" action="index.php">
  25.    
  26.     <input type="hidden" name="add" value="true" />
  27.     <div>
  28.         <label for"title">Post Title:</label>
  29.         <input type="text" name="title" id="title" />
  30.     </div>
  31.    
  32.     <div>
  33.         <label for="body">Body:</label>
  34.         <textarea name="body" id="body" rows="8" cols="40"></textarea>
  35.     </div>
  36.    
  37.     <input type="submit" name="submit" value="Post This!" />
  38. </form>
  39.  
  40.     <?php
  41.         if($_POST['add']);
  42.             $obj->add_content($_POST);
  43.         endif;
  44.        
  45.     ?>
  46.  
  47. </div>
  48. </body>
  49. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement