Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Update Contractor info
- function addUpdate($postalcode, $description, $phonenumber, $contract_type, $location)
- {
- $conn = openDatabase();
- $description = $_POST['description'];
- $postalcode = $_POST['postalcode'];
- $phonenumber = $_POST['phonenumber'];
- $location = $_POST['location'];
- $contract_type = $_POST['contract_type'];
- $id = $_SESSION['user_id'];
- $sql="UPDATE contractors SET description='$description', contract_type='$contract_type', phonenumber='$phonenumber', postalcode='$postalcode', location='$location' WHERE id='" . $_SESSION['user_id'] . "'";
- $result=mysqli_query($conn, $sql);
- if ($result)
- {
- $message = "Contractor update succeeded";
- }
- else
- {
- $message = "Error updating contractor";
- }
- closeDatabase($conn);
- return $message;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement