Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="proc.php">
- <table>
- <tr>
- <td>Username:</td>
- <td><input type="text" name="user" id="user"></td>
- </tr>
- <tr>
- <td>password:</td>
- <td><input type="text" name="password" id="password"></td>
- </tr>
- <tr>
- <td></td>
- <td><input type="submit" value="submit"></td>
- </tr>
- </table>
- </form>
- $dbq = "SELECT * FROM accounts;";
- $dbqDoIt = mysqli_query($connect2db, $dbq)or die("error".mysqli_error($connect2db));
- $getNames = mysqli_fetch_array($dbqDoIt);
- //check if user acc. exists inside vSpot database.
- if(($name !== $getNames['username']) || ($pass !== $getNames['password'])){
- header("Location:index.php"); /* Redirect browser */
- $nums = array(1,2,3,4,5);
- for($i=0; $i<6; $i++){
- if($nums[0] < 6 ) echo $i . '<br/>';
- }
- while($getNames = mysqli_fetch_array($dbqDoIt)){
- //check if user acc. exists inside my database.
- if(($name !== $getNames['username']) || ($pass !== $getNames['password'])){
- header("Location:index.php"); /* Redirect them to log in */
- }
- }
- $query = "SELECT user_id FROM accounts WHERE username = :username";
- $dbq = "SELECT * FROM accounts WHERE username = '$name';";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement