Advertisement
Guest User

Untitled

a guest
May 22nd, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. if (isset($_GET['news-edit'])) {
  2. $id = $_GET['news-edit'];
  3.  
  4. $sql = mysql_query("
  5. SELECT *, news.id AS newsid
  6. FROM news
  7. JOIN users ON (users.id=news.uid)
  8. WHERE news.id = '$id' LIMIT 1") or die(mysql_error());
  9.  
  10. while($news = mysql_fetch_array($sql))
  11. echo '<div class="article2">   
  12.                 <div class="story2">
  13.                     <h4 class="title">Ändring av '.$news['title'].'</h4>  
  14.                     <p><form method="post">Titel: <br /><input name="title" type="text" value="'.$news['title'].'"><br />
  15.                     Bild: <br /><input name="img" type="text" value="'.$news['img'].'"><br />
  16.                        Inledande Text: <br /><textarea rows="10" cols="80" name="pretext">'.$news['pretext'].'</textarea><br />
  17.                        Texten: <br /><textarea rows="10" cols="80" name="text">'.$news['text'].'</textarea></p>
  18.                        <input type="submit" value="update" class="login" name="update" />
  19.                        </form>
  20.                 </div>
  21.             </div>';
  22.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement