Why isn't Age index existing? |
Why isn't Age index existing? |
masonh928 |
Jan 22 2016, 08:27 PM
Post
#1
|
Serious Coder Group: Members Posts: 253 Joined: 17-August 13 From: Indiana Member No.: 19,570 |
CODE <?php session_start(); error_reporting(E_ALL); require_once("Scripts/PHP/Class/Update.class.php"); if(!empty($_POST['Languages'])){ $_POST['Languages'] = json_encode($_POST['Languages']); } if(!empty($_POST['birthday_month']) && !empty($_POST['birthday_day']) && !empty($_POST['birthday_year'])){ $_POST['Age'] = $_POST['birthday_month'] . ", " . $_POST['birthday_day'] . " " . $_POST['birthday_year']; $_POST['birthday_month'] = NULL; $_POST['birthday_day'] = NULL; $_POST['birthday_year'] = NULL; } $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); $DataUpdate = array_filter($_POST); $Columns = array_keys($DataUpdate); //print_r($DataUpdate) //It returns that index, Age, doesn't exist and that birthday_month, day and year still are returned, when they're supposedly Nullified. $Update = new Update($Columns, $DataUpdate, $_SESSION['ID']); $Update->bindData(); $Update->bindQuery(); $Update->Update(); $Update->Redirect("Successfully Updated Your Profile"); exit(); ?> |
CharlesEF |
Jan 23 2016, 01:40 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Where is the HTML form for this code? 1 or more of the 3 $_POST values is not what you think so the entire
CODE if(!empty($_POST['birthday_month']) && !empty($_POST['birthday_day']) && !empty($_POST['birthday_year'])) section is skipped. Maybe there is a variable name case problem?This post has been edited by CharlesEF: Jan 23 2016, 01:40 AM |
Lo-Fi Version | Time is now: 29th March 2024 - 04:27 AM |