为了存储数据,我将 Jotforms 集成到了登录页面中。但是,提交后我遇到了问题。每次有人提交表单时,jotforms 都会出现这个错误的东西,就像一个新的页面一样,但它实际上仍然向 jotforms 提交数据。一旦他们提交,我就想拥有它,要么只是回到页面顶部,要么是一个弹出窗口,上面写着谢谢你提交或类似的东西
<?php
// $manager = new MongoDB\Driver\Manager("mongodb+srv://tribit_proxy_user:uM3JLpGJr58GeVf@cluster0.j6oly.mongodb.net/test?authSource=admin&replicaSet=atlas-115czw-shard-0&readPreference=primary&appname=MongoDB%20Compass&ssl=true");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ShopCK</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./style.css">
</link>
</head>
<?php
if (isset($_POST['submission_id'])) {
// $bulk = new MongoDB\Driver\BulkWrite;
// $document = ['contactName' => $_POST['contactname'], 'contactEmail' => $_POST['contactemail'], 'contactPhone' => $_POST['contactphone'], 'businessName' => $_POST['businessname'], 'businessPhone' => $_POST['businessphone'], 'businessPhysicalAddress' => $_POST['businessphysical'], 'businessEmail' => $_POST['businessemail'], 'businessWebsite' => $_POST['businesswebsite'], 'facebook' => $_POST['facebook'], 'twitter' => $_POST['twitter'], 'instagram' => $_POST['instagram'], 'youtube' => $_POST['youtube'], 'linkedin' => $_POST['linkedin'], 'businessCategory' => $_POST['businesscategory'], 'businessDescription' => $_POST['businessdescription'], 'additionalComment' => $_POST['anyadditionalcomment'], 'businessImages' => $_POST['uploadany']];
// $bulk->insert($document);
// $result = $manager->executeBulkWrite('test.user', $bulk);
echo "<h1>DATA INSERTED SUCCESSFULLY</h1>";
}
?>
<body>
<div class="shopck-banner">
<div class="banner-logo-container">
<img alt="" src="./images/Logo.png">
</div>
<div>
<h2 class="banner-title">ShopCK is coming soon!</h2>
<h6 class="banner-description">Providing a directory to discover and support local businesses.</h6>
</div>
<a style="text-decoration: none;" href="#form-container">
<div class="banner-btn-container">
<button class="banner-btn">Register now</button>
</div>
</a>
<div class="instagram-link"><a target="_blank" href="https://www.instagram.com/k_wicksy/"><i style="color: white; margin-right:6px" class="fa fa-camera"></i>@k_wicksy</a></div>
</div>
<div id="form-container">
<script type=" text/javascript" src="https://form.jotform.com/jsform/211297864375264"></script>
</div>
<div class="shopck-footer">
<a target="_blank" class="powerd-by-section" href="https://www.tribitsoftware.ca/">
<h6>Powered by Tribit Software</h6>
<div class="avatar">
<img src="./images/Tribit.png">
</div>
</a>
<p class="copyright">@Copyright 2021 ShopCK</p>
</div>
<?php
?>
</body>
</html>
html {
scroll-behavior: smooth;
}
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
}
.shopck-banner{
background-image: url('./images/ShopCKHomeDark.png');
background-position: center top;
background-size: cover;
background-repeat: no-repeat;
padding-top: 30px;
height: 100vh;
position: relative;
}
.banner-logo-container{
display: flex;
align-items: center;
justify-content: center;
}
.banner-logo-container img{
width: 200px;
margin-bottom: 8px;
}
.banner-title{
color: #FFF;
font-weight: bold;
text-align: center;
font-size: 3.75rem;
line-height: 1.2;
letter-spacing: -0.00833em;
margin-bottom: 8px;
}
.banner-description{
color: #FFF;
font-size: 1.25rem;
font-weight: 500;
line-height: 1.6;
letter-spacing: 0.0075em;
text-align: center;
margin-bottom: 8px;
}
.banner-btn-container{
display: flex;
align-items: center;
justify-content: center;
}
.banner-btn{
border: none;
color: #FFF;
align-self: flex-end;
margin-top: 32px;
padding-top: 15px;
padding-left: 25px;
padding-right: 25px;
padding-bottom: 15px;
background-color: #000;
font-size: 0.875rem;
min-width: 64px;
box-sizing: border-box;
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,border 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
font-weight: 500;
line-height: 1.75;
border-radius: 4px;
letter-spacing: 0.02857em;
text-transform: uppercase;
cursor: pointer;
}
.banner-btn:hover{
color: #FFF;
background-color: #2b2b2b;
}
.instagram-link{
position: absolute;
bottom: 16px;
right: 16px;
}
.instagram-link a{
color: #FFF;
text-decoration: none;
cursor: pointer;
}
.instagram-link a:hover{
color:#ddd;
}
.shopck-footer{
color: #939596;
padding: 20px;
min-height: 50px;
background-color: #1c1d1f;
}
.powerd-by-section{
display: flex;
align-items: center;
color: #939596;
text-decoration: none;
transition: all .3s ease;
}
.powerd-by-section:hover{
color: #ddd;
}
.powerd-by-section h6{
font-size: 1.25rem;
font-weight: 500;
line-height: 1.6;
letter-spacing: 0.0075em;
}
.powerd-by-section img{
width: 50px;
height: 50px;
border-radius: 50%;
margin-left: 8px;
}
.copyright{
margin-top: 15px;
font-size: 0.875rem;
font-weight: 400;
line-height: 1.43;
letter-spacing: 0.01071em;
}