function doChange() { $retval = true; if (isset($_POST["oldpw"]) && @$_POST["oldpw"] != "") { echo $_POST["oldpw"]; if (!changePassword(@$_POST["oldpw"], @$_POST["pw"], @$_POST["pwcfrm"])) { return false; } } if (!changeFirstName(@$_POST["firstname"])) { $retval = false; } if (!changeSurName(@$_POST["surname"])) { $retval = false; } if (!changeDescription(@$_POST["description"])) { $retval = false; } if (!changeHomepage(@$_POST["homepage"])) { $retval = false; } if (!changeEMail(@$_POST["e_mail"])) { $retval = false; } $uid = $_SESSION["user"]->user_id; if (!$_SESSION["user"]->selectByID($uid)) { fehlerausgabe("Fehler beim Neuladen des Userprofils. Bitte melden Sie sich neu an"); die; } return $retval; }
<?php require_once 'autoload.php'; $vehicle = new Vehicle('Ford'); function changeDescription($object) { $object->setDescription('New Description'); } var_dump($vehicle->getDescription()); changeDescription($vehicle); var_dump($vehicle->getDescription());
$key = ini_get("session.upload_progress.prefix") . $_POST[ini_get("session.upload_progress.name")]; var_dump($_SESSION[$key]); print_r($_SESSION); if (!empty($_SESSION[$key])) { $current = $_SESSION[$key]["bytes_processed"]; $total = $_SESSION[$key]["content_length"]; echo $current < $total ? ceil($current / $total * 100) : 100; } else { echo 100; } imageUpload(); $data = requestData(); if ($data) { if (isset($_REQUEST["descriptionhidden"])) { if ($data["DESCRIPTION"] != $_REQUEST["descriptionhidden"]) { changeDescription($_REQUEST["descriptionhidden"]); } } if (isset($_REQUEST["password"])) { if ($data["PASSWORD"] != $_REQUEST["password"] && strlen($_REQUEST["password"]) != 0) { changePassword($_REQUEST["password"]); } } header("location: account.php?fx=update&value=true"); exit; } header("location: account.php?fx=update&value=false"); exit; break; case 'login': $email = $_REQUEST['email'];