c
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("UPDATE cleads SET name = :name, email = :email, phone = :phone, date = :date, status = :status, user = :user, country = :country, state= :state, city = :city, address = :address, profession = :profession, coupon_code = :coupon_code, gender = :gender, warm_status = :warm_status WHERE id = :id");
|
||||
$stmt = $conn->prepare("UPDATE cleads SET name = :name, email = :email, phone = :phone, date = :date, status = :status, user = :user, country = :country, state= :state, city = :city, address = :address, profession = :profession, coupon_code = :coupon_code, gender = :gender, warm_status = :warm_status, business_type = :business_type WHERE id = :id");
|
||||
$stmt->bindParam(':name', $_POST['name']);
|
||||
$stmt->bindParam(':email', $_POST['email']);
|
||||
$stmt->bindParam(':phone', $_POST['phone']);
|
||||
@@ -32,6 +32,7 @@
|
||||
$stmt->bindParam(':coupon_code', $_POST['coupon_code']);
|
||||
$stmt->bindParam(':gender', $_POST['gender']);
|
||||
$stmt->bindParam(':warm_status', $_POST['warm_status']);
|
||||
$stmt->bindParam(':business_type', $_POST['business_type']);
|
||||
$stmt->bindParam(':id', $_GET['id']);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -190,11 +191,35 @@
|
||||
<input class="w-full" type="text" name="profession" id="profession" value="<?php echo $row['profession']; ?>" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 p-3 border-b-2 border-[#D9D9D9] space-x-6" style="text-align: left;">
|
||||
<div class="grid grid-cols-3 p-3 border-b-2 border-[#D9D9D9] space-x-6" style="text-align: left;">
|
||||
<div>
|
||||
<p><b>Origin</b></p>
|
||||
<p style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;"><?php echo $row['origin'] ?: "No origin"; ?></p>
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Verticals</b></p>
|
||||
<select class="w-full" name="business_type" id="business_type" style="border: 1px solid #D9D9D9; border-radius: 5px; padding: 6px;">
|
||||
<option value="">-Select-</option>
|
||||
<?php
|
||||
try {
|
||||
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
$stmt = $conn->prepare("SELECT * FROM business_verticals");
|
||||
$stmt->execute();
|
||||
$businessRows = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach($businessRows as $businessVerticals) {
|
||||
// Check if the current business vertical is the one selected
|
||||
$isBVSelected = ($row['business_type'] == $businessVerticals['bv']) ? 'selected' : '';
|
||||
echo '<option value="'.$businessVerticals['bv'].'" '.$isBVSelected.'>'.$businessVerticals['bv'].'</option>';
|
||||
}
|
||||
} catch (PDOException $e) {
|
||||
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Lead Status</b></p>
|
||||
<div class="flex flex-row">
|
||||
|
||||
Reference in New Issue
Block a user