D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
probwael
/
www
/
Filename :
editprofile_update.php
back
Copy
<?php session_cache_expire(120); ini_set('session.gc_maxlifetime', 7200); @session_start(); //--------------- include("conn.php"); $em=$_SESSION["em"]; $fullname=$conn->real_escape_string(htmlentities($_POST["fullname"],ENT_QUOTES)); $phone=$conn->real_escape_string(htmlentities($_POST["phone"],ENT_QUOTES)); $postal=$conn->real_escape_string(htmlentities($_POST["postal"],ENT_QUOTES)); $upd=date('d-M-Y h:i:s:a'); if($fullname=='' or $phone=='' or $postal=='') { $_SESSION["msg"]='<<br>font color=red><b>Invalid operation... One or more required inputs missing! </b></font><br><br>'; header("location: editprofile"); } else { //----update account mysqli_query($conn, "update _register set fullname='$fullname', phone='$phone', postal='$postal' where email='$em'") or die(mysqli_error($conn)); $_SESSION["msg"]='<br><font color=green><b>Profile successfully modified! </b></font> <br><br>'; header("location: dashboard"); } ?>