问题
I have created a SignUp page with HTML,CSS AND BOOTSTRAP....For Validation i've used javascript and php for database connectivity....when i submit the form it only validates but not refelecting in the database...To be exact when i click submit button It just validates and not reflecting in Mysql?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Sign Up Page</title>
<link rel="stylesheet" type="text/css" href="style1.css">
</head>
<body>
<div class="container">
<div class="header">
<h2>Sign Up</h2>
</div>
<form class="form" id="form" onsubmit="javascript.js" action="insert.php" method="POST">
<div class="form-control">
<label>Username</label>
<input type="text" placeholder="Imran010" id="username" name="username">
<small>Error Message</small>
</div>
<div class="form-control">
<label>email</label>
<input type="Email" placeholder="Imran010@abc.com" id="email" name="email">
<small>Error Message</small>
</div>
<div class="form-control">
<label>Password</label>
<input type="Password" placeholder="Password" id="password" name="password">
<small>Error Message</small>
</div>
<div class="form-control">
<label>Check Password</label>
<input type="password" placeholder="Password Check" id="password2" name="password2">
<small>Error Message</small>
</div>
<button id="Submit" name="submit">Submit</button>
</form>
</div>
<script type="text/javascript" src="javascript.js"></script>
</body>
</html>
来源:https://stackoverflow.com/questions/63257308/on-clicking-submit-button-server-side-php-code-is-not-working