Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if($_GET['action2'] == "news")
- {
- if(empty($_POST['submit']))
- {
- ?>
- <form method="post">
- Tytuł : <input type="text" name="title"><br>
- Text : <textarea style="width:300px; height:150px;" name="text"></textarea><br>
- <input type="submit" name="submit" value="Wyslij!">
- <?php
- }
- else
- {
- $title = $_POST['title'];
- $text = htmlspecialchars($_POST['text']);
- $text = nl2br($text);
- $time = time();
- mysql_query("INSERT INTO `news` VALUES('NULL', '".$title."', '".$text."', '".$time."')");
- echo 'Newsa dodano!';
- }
- }
Add Comment
Please, Sign In to add comment