Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var title = '&';
- window.location.href = "process_article_selection.php?&title=" + encodeURIComponent(title);
- </script>
- <?php
- $passed_title = htmlspecialchars(isset($_GET['title']) ? $_GET['title'] : '', ENT_QUOTES);
- $string = substr($passed_title,0,64);
- if ( $string == false || $string == '' ) $string = $error[24];
- $checkIfEmpty = "SELECT title FROM content WHERE title='{$string}'";
- $checkIfEmpty2 = mysql_query($checkIfEmpty);
- if (mysql_num_rows($checkIfEmpty2 ) == 0) {
- $addArticle = "INSERT INTO content (title) VALUES ('{$string}')";
- $addArticle2 = mysql_query($addArticle) or die($error[5]);
- echo $string;
- } else { echo 'Niepowodzenie: podstrona o takim tytule już istnieje: "' . $string . '"'; }
- ?>
Add Comment
Please, Sign In to add comment