Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../_class/mycms_class.php';
- $obj = new myCMS();
- // Connection Variables
- $obj->host = 'localhost';
- $obj->username = 'camerong';
- $obj->password = 'PASSWORD HERE';
- $obj->db = 'camerong_mycms';
- //Connect to datbase
- $obj->connect();
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <meta content="text/html; charset=ISO-8859-1"
- http-equiv="content-type">
- <title>My CMS - Alpha</title>
- </head>
- <body>
- <div id="pagecontent">
- <form method="post" action="index.php">
- <input type="hidden" name="add" value="true" />
- <div>
- <label for"title">Post Title:</label>
- <input type="text" name="title" id="title" />
- </div>
- <div>
- <label for="body">Body:</label>
- <textarea name="body" id="body" rows="8" cols="40"></textarea>
- </div>
- <input type="submit" name="submit" value="Post This!" />
- </form>
- <?php
- if($_POST['add']);
- $obj->add_content($_POST);
- endif;
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement