Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Simple clean insert
- $sql = 'INSERT INTO `posts` (`title`, `content`) VALUES ("' . mysql_real_escape_string($_POST['post_title']) .'", "' . mysql_real_escape_string($_POST['post_content']) .'")';
- if (!mysql_query($sql)) {
- error_log('oops in sql query:' . mysql_error() . ' | the query was:' . $sql);
- }
- ?>
- // Simple output
- <input type="post_title" name="title" value="<?php echo htmlspecialchars($postRow['post_title']); ?>">
- <textarea name="post_content"><?php echo htmlspecialchars($postRow['post_content']); ?></textarea>
Advertisement
Add Comment
Please, Sign In to add comment