| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/www/news/move/ |
Upload File : |
<?php session_start();
ob_start();
include('./db.php');?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Register</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<script>
$(document).ready(function()
{
$('#register').on('submit', function(e)
{
e.preventDefault();
$('#submit-button').attr('disabled', ''); // disable upload button
//show uploading message
$("#loadding").html('<div style="padding:10px">Working...</div>');
$(this).ajaxSubmit({
target: '#output',
success: afterSuccess //call function after success
});
});
});
function afterSuccess()
{
$('#submit-button').removeAttr('disabled'); //enable submit button
$('#loadding').html('');
}
</script>
<div class="submit-resgiter">
<div class="title">Register for Free</div><!--title-->
<div id="loadding"></div><!--loadding-->
<div id="output"></div><!--output-->
<form id="register" class="submit-story" method="post" action="submit_register.php">
<label for="username">User Name*</label>
<input type="input" name="username" id="username"/>
<label for="password">password*</label>
<input type="password" name="password" id="password"/>
<label for="password2">Re-enter password*</label>
<input type="password" name="password2" id="password2"/>
<label for="email">ชื่อ-นามสกุล*</label>
<input type="input" name="name" id="name"/>
<label for="school">เลือกโรงเรียน</label>
<select name="school" id="school">
<option value="">--เลือกโรงเรียน--</option>
<?php
$submitcat = $mysqli->query("SELECT id, c_name FROM categories ORDER BY id ASC");
while ($subcat = mysqli_fetch_array ($submitcat)){
?>
<option value="<?php echo $subcat['c_name'];?>"><?php echo $subcat['c_name'];?></option>
<?php
} ?>
</select>
<button type="submit" name="submit-button" id="submit-button">Submit</button>
</form>
</div><!--submit box-->
</body>
</html>