Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db_username = $_POST['SUusername'];
- $db_password = $_POST['SUpassword'];
- $servername = "localhost";
- $username = "root";
- $password = "taddei123";
- $dbname = "tie1";
- $db = new mysqli($servername, $username, $password, $dbname);
- /* check connection */
- if ($db->connect_errno) {
- printf("Connect failed: %s\n", $db->connect_error);
- exit();
- }
- $db_user_query = $db -> real_query ("SELECT user_name
- FROM login_admin
- WHERE user_name = $db_username
- ");
- if ($db_user_query == false){
- echo 'user ne postoji';
- }elseif($db_user_query == true){
- echo 'user postoji';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement