View sourcecode

The following files exists in this folder. Click to view.

uppdatera_information.php

15 lines UTF-8 Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
session_start
();
require_once(
'check_login.php');
require_once(
'database_connection.php');

$nytt_användarnamn trim($_POST['Nytt_Användarnamn']);
$nytt_lösenord trim($_POST['Nytt_Lösenord']);
$userId trim($_POST['userId']);

$sql "UPDATE user SET username = :username, password = :password WHERE userId = :userId";
$stm $pdo->prepare($sql);
$stm->execute(array('username' => $nytt_användarnamn'password' => $nytt_lösenord'userId' => $userId));

header("location: admin.php");
?>