+ 1

this my source code does not work please help me by editing it

<?php include_once 'db_connect.php'; include_once 'functions.php'; $client_id = $_POST['client_id']; $name = $_POST['name']; $national_id = $_POST['national_id']; $address = $_POST['address']; $tel_1 = $_POST['tel_1']; $tel_2 = $_POST['tel_2']; $email = $_POST['email']; $client_category = $_POST['client_category']; $kra_pin= $_POST['kra_pin']; $next_of_kin = $_POST['next_of_kin']; $next_of_kin_tel = $_POST['next_of_kin_tel']; $sql = ("UPDATE clients SET client_id='$client_id', name='$name', national_id='$national_id', address='$address', tel_1='$tel_1', tel_2='$tel_2', email='$email', client_category='$client_category', kra_pin='$kra_pin', next_of_kin='$next_of_kin', next_of_kin_tel='$next_of_kin_tel' WHERE client_id='$client_id'"); $imagine = "../images/smile.jpeg"; $view = "../add_litigation_matter.php"; $non = "../add_non_litigation_matter.php" if ($mysqli->query($sql) === TRUE) { echo "<p>Record saved. <a href = '$view'>Add Litigation File</p>"; echo "<p><a href = '$non'>Add Non Litigation File</p>"; header("refresh:5;url=../add_litigation_matter.php"); } else { echo "Error: " . $sql . "<br>" . $mysqli->error; } $mysqli->close(); ?>

19th Dec 2016, 9:28 AM
Samuel Mwaniki Muthui
Samuel Mwaniki Muthui - avatar
1 Odpowiedź
+ 1
So before trying to understand the entire code, I can see that there's no semicolon ; at the end of the declaration of the $non variable.
19th Dec 2016, 12:26 PM
CHMD
CHMD - avatar