Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function OpenCon()
- {
- $dbhost = 'localhost';
- $dbuser = 'root';
- $dbpass = '0000';
- $db = 'mydatabase';
- $conn = new mysqli($dbhost, $dbuser, $dbpass, $db) or die ("Connect failed: %sn". $conn -> error);
- return $conn;
- }
- function CloseCon($conn)
- {
- $conn -> close();
- }
- ?>
- <?php
- include 'connection.php';
- $conn = OpenCon();
- echo "Connected Successfully";
- CloseCon($conn);
- ?>
- <form id='register-form' action="database/reg.php" method='post'>
- <input type="text" maxlength="15" name="usr" placeholder="Username" required>
- <input type="text" name="fname" placeholder="First Name" required>
- <input type="text" name="lname" placeholder="Last Name" required>
- <input type="email" name="mail" placeholder="Email" required>
- <input type="password" name="psw" placeholder="Password" required>
- <input type="password" placeholder="Re Password" required>
- <button type='submit'> Εγγραφή</button>
Add Comment
Please, Sign In to add comment