Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../inc/connect.php';
- $data = mysql_query("SELECT * FROM content" ) or die(mysql_error());
- //Henter indhold fra formular
- $titel = mysql_real_escape_string($_POST['titel']);
- $overskrift = mysql_real_escape_string($_POST['heading']);
- $tekst = mysql_real_escape_string($_POST['tekst']);
- $id = mysql_real_escape_string($_POST['id']);
- // Indsæt i tabel
- if (isset($_POST['submit'])) {
- $tabeldata = "UPDATE content SET titel = '$titel',heading = '$overskrift',tekst = '$tekst' WHERE id = '$id'";
- $resultat = mysql_query($tabeldata);
- if($resultat) {
- header ('Location: ../index.php?msg=SUCCES');
- }
- else {
- header ('Location: ../index.php?msg=FAILED');
- }
- }
- else {
- header('Location: ../index.php?msg=ACCESS_DENIED');
- }
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment