mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 19:34:52 +00:00
Fix Add Photo under add contact
This commit is contained in:
2
post.php
2
post.php
@@ -3409,10 +3409,10 @@ if(isset($_POST['add_contact'])){
|
|||||||
|
|
||||||
mysqli_query($mysqli,"INSERT INTO contacts SET contact_name = '$name', contact_title = '$title', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_email = '$email', contact_notes = '$notes', contact_created_at = NOW(), contact_client_id = $client_id, company_id = $session_company_id");
|
mysqli_query($mysqli,"INSERT INTO contacts SET contact_name = '$name', contact_title = '$title', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_email = '$email', contact_notes = '$notes', contact_created_at = NOW(), contact_client_id = $client_id, company_id = $session_company_id");
|
||||||
|
|
||||||
|
$contact_id = mysqli_insert_id($mysqli);
|
||||||
|
|
||||||
//Update Primay contact in clients if primary contact is checked
|
//Update Primay contact in clients if primary contact is checked
|
||||||
if($primary_contact > 0){
|
if($primary_contact > 0){
|
||||||
$contact_id = mysqli_insert_id($mysqli);
|
|
||||||
mysqli_query($mysqli,"UPDATE clients SET primary_contact = $contact_id WHERE client_id = $client_id");
|
mysqli_query($mysqli,"UPDATE clients SET primary_contact = $contact_id WHERE client_id = $client_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user