0

help me

Below is a simple login form. $ uname is a variable in php. End of a line of php like that; Put the symbol. $ _POST ['pass'] is a variable that serves as input to the input field we pass. Here is a simple explanation. * Now you have to do. All the lines on this line clearly explain all the symbols. * This will get you 50COSC *. The answer is correct and marks the perfection. <? php $ uname = "Griffin"; $ pass = "COS"; if (isset ($ _ POST ['uname'])) { $ u = $ _ POST ['uname']; if (isset ($ _ POST ['pass'])) { $ p = $ _ POST ['pass']; if ($ uname == $ u & $ pass == $ p) { echo ('successfuly loged in'. $ u); {else { echo 'incorrect details.'; } } ?> <html> <head> <title> login </title> </head> <body> <form action = "#" method = "post"> <input type = "text" name = "uname"> <input type = "password" name = "pass"> <button> Submit </button> </form> </body> </html>

25th Jun 2020, 2:11 PM
noty lakiya
noty lakiya - avatar
9 odpowiedzi
0
There shouldn't be any space between $ and variable name. Sorry, but your description is unclear. I don't understand what help you need here. I suggest you to edit the thread and rephrase the description And please put relevant language in the thread tags (PHP) instead of 'plz' 👍
25th Jun 2020, 2:19 PM
Ipang
+ 1
I already answered you buddy Did you read the links I included? They should clear your doubt ...
25th Jun 2020, 3:42 PM
Ipang
0
plz inbox me
25th Jun 2020, 2:24 PM
noty lakiya
noty lakiya - avatar
0
Messaging feature currently unavailable for me. Can you describe what help you need here, use simple words only.
25th Jun 2020, 2:26 PM
Ipang
0
Say what else is in this php code. line one by one <?php $uname="Griffin"; $pass="COS"; if (isset($_POST['uname'])){ $u=$_POST['uname']; if (isset($_POST['pass'])){ $p=$_POST['pass']; if ($uname==$u & $pass==$p){ echo ('successfuly loged in '.$u); }else{ echo 'incorrect details.'; } }} 👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆 line one by one
25th Jun 2020, 2:40 PM
noty lakiya
noty lakiya - avatar
0
Begin by understanding $_POST 👇 https://www.w3schools.com/php/php_superglobals_post.asp And what `isset` function was about 👇 https://www.w3schools.com/php/func_var_isset.asp In short, the snippet checks whether <uname> and <pass> was submitted with form data. And then assign their values to local variables <$u> and <$p>. Next it checks whether the submitted name and password match "Griffin" and "COS", respectively.
25th Jun 2020, 3:04 PM
Ipang
0
Plz give me your answer
25th Jun 2020, 3:41 PM
noty lakiya
noty lakiya - avatar
0
Thankx
25th Jun 2020, 3:45 PM
noty lakiya
noty lakiya - avatar
0
Nop this is dont my need answer 😰
25th Jun 2020, 3:47 PM
noty lakiya
noty lakiya - avatar