| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2c.hellogtx.com/ |
Upload File : |
<?php
$responseMessage = "";
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$firstName = $_POST['fullname'] ?? '';
$email = $_POST['email'] ?? '';
$mobile = $_POST['mobile_number'] ?? '';
$message = $_POST['comment'] ?? '';
$url = "https://st.globaltravelexchange.com/gtxwebservices/website-lead/index/AgencySysId/369FB021-CF12-4627-AD0A-3C43AADA940A";
$postData = [
"FirstName" => $firstName,
"Email" => $email,
"MobileNumber" => $mobile,
"message" => $message,
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
$response = curl_exec($ch);
$error = curl_error($ch);
curl_close($ch);
if ($error) {
$responseMessage = "<div class='response error'>❌ Curl Error: " . htmlspecialchars($error) . "</div>";
} else {
if (stripos($response, "success") !== false) {
$responseMessage = "<div class='response success'>✅ Submitted Successfully!</div>";
} else {
$responseMessage = "<div class='response error'>❌ " . htmlspecialchars($response) . "</div>";
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lead Form</title>
<style>
body {
font-family: Arial, sans-serif;
background: #f9f9f9;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
}
.form-container {
background: #fff;
padding: 25px;
border-radius: 12px;
box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
width: 100%;
max-width: 400px;
}
h2 {
margin-bottom: 20px;
color: #333;
text-align: center;
}
label {
font-size: 14px;
color: #555;
margin-bottom: 5px;
display: block;
}
input, textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 8px;
font-size: 14px;
}
button {
width: 100%;
padding: 12px;
background: #007bff;
border: none;
border-radius: 8px;
color: white;
font-size: 16px;
cursor: pointer;
transition: 0.3s;
}
button:hover {
background: #0056b3;
}
.response {
margin-top: 15px;
padding: 10px;
border-radius: 6px;
font-size: 14px;
}
.success { background: #d4edda; color: #155724; }
.error { background: #f8d7da; color: #721c24; }
</style>
</head>
<body>
<div class="form-container">
<h2>Submit Your Details</h2>
<form method="POST" action="">
<label for="fullname">Full Name</label>
<input type="text" id="fullname" name="fullname" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="mobile_number">Mobile Number</label>
<input type="text" id="mobile_number" name="mobile_number" required>
<label for="comment">Message</label>
<textarea id="comment" name="comment" rows="4" required></textarea>
<button type="submit">Submit</button>
</form>
<?= $responseMessage ?>
</div>
</body>
</html>