<div dir="ltr">van egy process.php fájlom amiben az alábbi kódot tettem:<div><br></div><div><?php<br>$username=$_POST['user'];<br>$password=$_POST['pass'];<br><br>$mysqli=mysqli_connect("localhost","root","","big");<br>mysqli_report(MYSQLI_REPORT_ERROR);<br><br><br>$query = "SELECT id, username, password, level FROM users WHERE username='$username' <br>AND password='$password'";<br>$result = mysqli_query($mysqli,$query)or die(mysqli_error());<br>$num_row = mysqli_num_rows($result);<br>$row=mysqli_fetch_array($result);<br><br>if( $num_row == 1 )<br>{<br> echo 'Wellcome!!! <b>'.$row['username'].'</b> nevű felhasználó<br />';<br>   if($row['level'] == 0)<br>        {<br>             echo '<b>USER szintű felhasználó</b>';<br>         echo '<br>';<br>            echo '<a href="logout.php" class="btn btn-danger">Kijelentkezés</a>';<br>        }<br>     if($row['level'] == 1)<br>        {<br>             echo '<b>ADMIN szintű felhasználó</b><br />';<br>            $sql = "SELECT * FROM users";<br>               $query = mysqli_query($mysqli,$sql);<br>      if(!$query)<br>             {<br>                     echo "Query does not work.".mysqli_error($conn);die;<br>                }<br>             while($data = mysqli_fetch_array($query))<br>             {<br>                     echo "Id = ".$data['id']."<br>";<br>                    echo "Username = ".$data['username']."<br>";<br>                        echo "Password = ".$data['password']."<br>";<br>                        echo "Level = ".$data['level']."<br><hr>";<br>            }<br>             echo '<br>';<br>            echo '<a href="logout.php" class="btn btn-danger">Kijelentkezés</a>';<br>        }<br>}<br>else<br>    {<br>             echo '<b>Valamit nagyon el tetszett nyomkodni :)</b>';<br>            echo '<br>';<br>            echo '<a href="logout.php" class="btn btn-danger">Vissza</a>';<br>        }<br>?><br><br></div><div>a problémám az, hogy ha az url-t beírom <a href="http://127.0.0.1/web/process.php">http://127.0.0.1/web/process.php</a></div><div>itt elvileg semmit nem írhat ki, erre:</div><div><font size="1" style="color:rgb(0,0,0);font-family:"Times New Roman""><br class="gmail-Apple-interchange-newline"><table class="gmail-xdebug-error gmail-xe-notice" dir="ltr" border="1" cellspacing="0" cellpadding="1"><tbody><tr><th align="left" bgcolor="#f57900" colspan="5"><span style="background-color:rgb(204,0,0);color:rgb(252,233,79);font-size:x-large">( ! )</span> Notice: Undefined index: user in C:\wamp64\www\web\process.php on line <i>2</i></th></tr><tr><th align="left" bgcolor="#e9b96e" colspan="5">Call Stack</th></tr><tr><th align="center" bgcolor="#eeeeec">#</th><th align="left" bgcolor="#eeeeec">Time</th><th align="left" bgcolor="#eeeeec">Memory</th><th align="left" bgcolor="#eeeeec">Function</th><th align="left" bgcolor="#eeeeec">Location</th></tr><tr><td bgcolor="#eeeeec" align="center">1</td><td bgcolor="#eeeeec" align="center">0.0001</td><td bgcolor="#eeeeec" align="right">362584</td><td bgcolor="#eeeeec">{main}( )</td><td title="C:\wamp64\www\nzs\process.php" bgcolor="#eeeeec">...\process.php<b>:</b>0</td></tr></tbody></table></font><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"></span><br style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><font size="1" style="color:rgb(0,0,0);font-family:"Times New Roman""><table class="gmail-xdebug-error gmail-xe-notice" dir="ltr" border="1" cellspacing="0" cellpadding="1"><tbody><tr><th align="left" bgcolor="#f57900" colspan="5"><span style="background-color:rgb(204,0,0);color:rgb(252,233,79);font-size:x-large">( ! )</span> Notice: Undefined index: pass in C:\wamp64\www\web\process.php on line <i>3</i></th></tr><tr><th align="left" bgcolor="#e9b96e" colspan="5">Call Stack</th></tr><tr><th align="center" bgcolor="#eeeeec">#</th><th align="left" bgcolor="#eeeeec">Time</th><th align="left" bgcolor="#eeeeec">Memory</th><th align="left" bgcolor="#eeeeec">Function</th><th align="left" bgcolor="#eeeeec">Location</th></tr><tr><td bgcolor="#eeeeec" align="center">1</td><td bgcolor="#eeeeec" align="center">0.0001</td><td bgcolor="#eeeeec" align="right">362584</td><td bgcolor="#eeeeec">{main}( )</td><td title="C:\wamp64\www\nzs\process.php" bgcolor="#eeeeec">...\process.php<b>:</b>0</td></tr></tbody></table></font><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"></span><b style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">Valamit nagyon el tetszett nyomkodni :)</b><br style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><a href="http://127.0.0.1/nzs/logout.php" class="gmail-btn gmail-btn-danger" style="font-family:"Times New Roman";font-size:medium">Vissza</a><br></div><div><br></div></div>