Jump to content

EmilyPham

New Members
  • Posts

    4
  • Joined

  • Last visited

EmilyPham's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I not understand much long words but i not feel ashamed to adolf boy jodunno in a mask trying to show his muscles so juvenile. I laugh at you. Strider64: Thanks you. You seem nice. But i not understand all your new code. I just wanted to correct my code. I am not a program woman. I am ceo. My coder moved long way. So I come here to correct simple problem. I do not like it here. You seem okay but I think i will leave as I cannot understand. All I wanted was a correction. This was error: Fatal error: Uncaught TypeError: mysqli_fetch_array(): Argument #1 ($result) must be of type mysqli_result, bool given in /home/primehor/emily***.com/register/restrict-login.php:10 Stack trace: #0 /home/primehor/emily***.com/register/restrict-login.php(10): mysqli_fetch_array() #1 {main} thrown in /home/primehor/emilydiem.com/register/restrict-login.php on line 10
  2. Oh great. I came for simple help and am basically told to read the manual, which I have tried but converting to Vietnamese loses far too much. And that's why I came here. I thought or hoped someone would add a correct line to my code to block the user. Then I could understand and learn. But no teachers here. > you would not include it in the WHERE term Duh! But it looks like I came to the wrong website, so far one just sits back and hints that I should read the book. The other tosses out so many ideas but none helpful for my problem. I am an almost totally disabled 35 year old woman who needed some help, but there is none here. So disappointing here. Shame on this website. Useless, lazy people I see so far sits in their self make chair but has no solution. Shame on all of you. No wonder this site has no traffic.
  3. Sorry, that did not help me. I am a beginner with php. I have no idea what you mean "Returns an array representing the fetched row, null if there are no more rows in the result set, or false on failure. I was hoping someone would show me what my should look like. I have gone this far and it works if I remove all mention of "authorized".
  4. <?php session_start(); include_once('includes/config.php'); if(isset($_POST['login'])) { $password=$_POST['password']; $dec_password=$password; $useremail=$_POST['uemail']; $ret= mysqli_query($con,"SELECT id,fname FROM users WHERE email='$useremail' and password='$dec_password' and authorized ='1'"); $num=mysqli_fetch_array($ret); if($num>0) { $_SESSION['id']=$num['id']; $_SESSION['name']=$num['fname']; header("location:welcome.php"); } else { echo "<script>alert('Invalid username or password');</script>"; } } ?> In cPanel, my mysql table data "bit" type is named "authorized". It throws an error each time it runs. I can't seem to figure out how to place that requirement. Plus if their registered account "authorized" equals "0", I need to show the user a message that they are not authorized or send them to a different php page. Can I do this using this same code but corrected? I do so much appreciate php help. This is my first questions so please forgive me if I am wrong with in how I am doing this. My English is not my first language.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.