| 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 : |
<!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;
display: none;
}
.success { background: #d4edda; color: #155724; }
.error { background: #f8d7da; color: #721c24; }
</style>
</head>
<body>
<div class="form-container">
<h2>Submit Your Details</h2>
<form id="leadForm">
<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>
<div id="responseBox" class="response"></div>
</div>
<script>
document.getElementById("leadForm").addEventListener("submit", function(e) {
e.preventDefault();
const formData = {
FirstName: document.getElementById("fullname").value,
Email: document.getElementById("email").value,
MobileNumber: document.getElementById("mobile_number").value,
message: document.getElementById("comment").value
};
fetch("https://st.globaltravelexchange.com/gtxwebservices/website-lead/index/AgencySysId/369FB021-CF12-4627-AD0A-3C43AADA940A", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams(formData)
})
.then(res => res.text())
.then(data => {
const box = document.getElementById("responseBox");
box.style.display = "block";
if (data.toLowerCase().includes("success")) {
box.className = "response success";
box.innerHTML = "✅ Submitted Successfully!";
} else {
box.className = "response error";
box.innerHTML = "❌ " + data;
}
})
.catch(err => {
const box = document.getElementById("responseBox");
box.style.display = "block";
box.className = "response error";
box.innerHTML = "❌ Request Failed: " + err;
});
});
</script>
</body>
</html>