Update into db, men den bliver ikke updated?
Den giver mig ingen fejl men intet i databasen bliver rettet!<?php
include("func.php");
DB::Conn("open");
if (isset($_POST['submit'])) {
if (!$_POST['username'] | !$_POST['activation'] | !$_POST['user_rating'] | !$_POST['edit_by']) {
Java::Alert("Du har glemt at skrive i alle felter!");
Java::GoToURL("index.php?menu=konto&page=rights");
die;
}
$_POST['username'] = strip_tags($_POST['username']);
$_POST['activation'] = strip_tags($_POST['activation']);
$_POST['user_rating'] = strip_tags($_POST['user_rating']);
$_POST['edit_by'] = strip_tags($_POST['edit_by']);
$edit_date = date('Y-m-d');
$username = $_POST['username'];
$activation = $_POST['activation'];
$user_rating = $_POST['user_rating'];
$edit_by = $_POST['edit_by'];
mysql_query("update tdf_users set activation = '$activation' and user_rating = '$user_rating' and edit_by = '$edit_by' and edit_date = '$edit_date' WHERE username = '$username'") or die (Java::Alert("MySQL Error: ".mysql_error()));
Db::Conn(close);
Java::GoToURL("index.php?menu=konto&page=rights");
}?>
Håber i kan hjælpe!