-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateFamilyController.php
35 lines (33 loc) · 1.1 KB
/
updateFamilyController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!--
updateFamilyController.php
-->
<?php
include "DB.php";
$famID = $_POST['famID'];
$email = mysqli_real_escape_string($db,$_POST['emailNew']);
$first = mysqli_real_escape_string($db, $_POST['parentFirstNameNew']);
$last = mysqli_real_escape_string($db, $_POST['parentLastNameNew']);
$add = mysqli_real_escape_string($db,$_POST['streetAddressNew']);
$city = mysqli_real_escape_string($db,$_POST['cityNew']);
$state = mysqli_real_escape_string($db,$_POST['stateNew']);
$zip = mysqli_real_escape_string($db,$_POST['zipNew']);
$hphone= mysqli_real_escape_string($db,$_POST['homePhoneNew']);
$wphone= mysqli_real_escape_string($db,$_POST['workPhoneNew']);
$cphone= mysqli_real_escape_string($db,$_POST['cellPhoneNew']);
$q = "UPDATE families SET
email = '$email',
parentFirstName = '$first',
parentLastName = '$last',
streetAddress = '$add',
city = '$city',
state = '$state',
zip = '$zip',
homePhone = '$hphone',
workPhone = '$wphone',
cellPhone = '$cphone'
WHERE familyID = $famID";
$r = mysqli_query($db, $q);
?>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=updateFamily.php">
</head>