query($sql); if ($result->num_rows == 0) { $error = "Invalid or expired ticket link. Please contact support if you need assistance."; } else { $ticket = $result->fetch_assoc(); // Handle form submission if ($_SERVER['REQUEST_METHOD'] === 'POST') { $user_reply = clean_input($_POST['user_reply']); if (empty($user_reply)) { $error = "Please enter your response"; } else { // Append user reply to the message $updated_message = $ticket['message'] . "\n\n--- User Response ---\n" . $user_reply; $updated_message = clean_input($updated_message); // Update ticket with user's response $update_sql = "UPDATE contact_messages SET message = '$updated_message', ticket_status = 'new' WHERE id = $ticket_id"; if ($conn->query($update_sql)) { $success = "Your response has been submitted successfully! Our support team will review and respond to your follow-up question."; // Refresh ticket data $result = $conn->query($sql); $ticket = $result->fetch_assoc(); } else { $error = "Failed to submit response. Please try again."; } } } } } $page_title = 'Respond to Ticket'; ?>
📧 What happens next:
Ticket ID: #
Submitted:
Replied on:
Type your follow-up message below and our support team will respond to your email.
© Paid Survey Hub India. All rights reserved.