17.03.2018, 11:06
Your action shouldnt be profile.php. this is where you get redirected after login. Save this as login.php
Also stop bumping after short amount of time. There is a 24 hours bump rule
Edit : lmao my tablet replaced all spaces with stars weird
Код:
<?php* *require('config.php');* *session_start();* *//*If*form*submitted,*insert*values*into*the*database.* *if*(isset($_POST['password'])){* *$username*=*$_POST['username'];* *$password*=*$_POST['password'];* *$username*=*stripslashes($username);* *$username*=*mysql_real_escape_string($username);* *$password*=*stripslashes($password);* *$password*=*mysql_real_escape_string($password);* *//Checking*is*user*existing*in*the*database*or*not* *$query*=*"SELECT***FROM*`users`*WHERE*username='$username'*and*password='".sha1($password)."'";* *$result*=*mysql_query($query)*or*die(mysql_error());* *$rows*=*mysql_num_rows($result);* *if($rows==1){* *$_SESSION['username']*=*$username;* *header("Location:*profile.php");*//*Redirect*user*to*index.php* *}else{* *echo*"random*text";* *}* *}else{* echo 'form*action="login.php"*method="post"*name="login">* <input*type="text"*name="username"*placeholder="Username"*required*/>* <input*type="password"*name="password"*placeholder="Password"*required*/>* <input*type="image"*src="https://i.imgur.com/uVoJ8Kl.pngg"*/>* </form>**'; *}* ?>
Edit : lmao my tablet replaced all spaces with stars weird