File manager - Edit - /home/familylifersmpc/htdocs/www.familylifersmpc.com/regSysInfo.php
Back
<?php //start PHP session session_start(); include('includes/conn.php'); include('includes/config.php'); //check if register form is submitted $sid = $_SESSION['alogin']; if(strlen($_SESSION['alogin'])=="") { header("Location: editor.php"); } else{ if(isset($_POST['register'])){ //assign variables to post values $BGCOLOR = $_POST['BGCOLOR']; $COLOR1 = $_POST['COLOR1']; $COLOR2 = $_POST['COLOR2']; $COOPNAME1 = $_POST['COOPNAME1']; $COOPNAME2 = $_POST['COOPNAME2']; $ABBREVIATION = $_POST['ABBREVIATION']; $EMAIL = $_POST['EMAIL']; $CONTACTNUM = $_POST['CONTACTNUM']; $ADDRESS= $_POST['ADDRESS']; $FBLink= $_POST['FBLink']; $MAP=$_POST['MAP']; $CYEAR=$_POST['CYEAR']; $stmt = $pdo->prepare('update tblsettings set COOPNAME1=:COOPNAME1, COOPNAME2=:COOPNAME2, ABBREVIATION=:ABBREVIATION, EMAIL=:EMAIL, CONTACTNUM=:CONTACTNUM, ADDRESS=:ADDRESS, FBLink=:FBLink, MAP=:MAP, CYEAR=:CYEAR, BGCOLOR=:BGCOLOR, COLOR1=:COLOR1, COLOR2=:COLOR2 where ID=1'); try{ $stmt->execute(['COOPNAME1' => $COOPNAME1, 'COOPNAME2' => $COOPNAME2, 'ABBREVIATION' => $ABBREVIATION, 'EMAIL' => $EMAIL, 'CONTACTNUM' => $CONTACTNUM, 'ADDRESS' => $ADDRESS, 'FBLink' => $FBLink, 'MAP' => $MAP, 'CYEAR' => $CYEAR, 'BGCOLOR' => $BGCOLOR, 'COLOR1' => $COLOR1, 'COLOR2' => $COLOR2]); $_SESSION['success'] = 'Settings successfully saved!'; } catch(PDOException $e){ $_SESSION['error'] = 'Fill up required fields!'; } } else{ $_SESSION['error'] = 'Fill up registration form first'; } header('location: SysInfo.php'); } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.16 |
proxy
|
phpinfo
|
Settings