File manager - Edit - /home/webapp68.cm.in.th/u68319090017/Project/017/regis.php
Back
<?php include 'header.php'; ?> <h2>สมัครสมาชิก</h2> <form action="regis.php" method="post"> Username: <input type="text" name="username" required><br> Password: <input type="password" name="password" required><br> <button type="submit" name="regis_btn">สมัครเลย</button> </form> <?php if(isset($_POST['regis_btn'])){ include 'connect.php'; $u = $_POST['username']; $p = $_POST['password']; // ควรใช้ password_hash ในงานจริง $sql = "INSERT INTO users (username, password) VALUES ('$u', '$p')"; if($conn->query($sql)){ echo "<script>alert('สมัครสำเร็จ!'); window.location='login.php';</script>"; } } include 'footer.php'; ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.67 |
proxy
|
phpinfo
|
Settings