SHARE
TWEET

Untitled

a guest Oct 16th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php  
  2.  
  3. session_start();
  4.  
  5.  
  6. if (!isset($_SESSION['adminin'])) header("Location: admin.php");
  7. $alias = (isset($_GET['alias'])) ? $_GET['alias'] : "1";       <-INNEN A KÖVETKEZŐ VAR JÖN: vevoszolgalat->
  8.  
  9.  
  10. require_once("./adatbazis.php");
  11.  
  12. $sql = "select text from pages where alias='{$alias}'";
  13.  
  14. $result = mysqli_query($dbconn,$sql);
  15. $row = mysqli_fetch_assoc($result);
  16.  
  17.  
  18. $menu= <<<MENU
  19.  
  20.  
  21. <form name="text"  method="post">
  22.   <textarea id='{$alias}' name='{$alias}'>{$row['text']}</textarea>
  23.   <input id="submit" name="submit" type="submit" value="Mentés" />
  24. </form>
  25.  
  26.  
  27.  
  28. MENU;
  29.  
  30.  
  31.  
  32.  
  33. print $menu;
  34.  
  35.  
  36.  
  37. if (isset($_POST['submit'])) {
  38.    
  39. $sql2 = "update pages set text = '{$_POST['$alias']}' where alias = '{$alias}';"; <-IDE KELL A $_POST['vevoszolgalat']->
  40.  
  41. mysqli_query($dbconn,$sql2);
  42. }
  43. print $_POST['vevoszolgalat'];
  44. print $sql;
  45. print $sql2;
  46. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top