Jump to content

N0L1m1t5

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by N0L1m1t5

  1. For example if I wanted to let any user to be able to add a page to my site where they can title it and give a description of it or whatever they like to it, what would the code be for doing this type of thing?
  2. If a user registers to a web im making, what would I have to do in order for an email be sent to him/her in order for him to activate it? Thank you!
  3. Im using a mac and whenever I go to phpmyadmin and try to change the password, there is a code that says (posted below) Error MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server. If I uninstall and then install xampp, it works fine again until I try to add a password, because then the same problem occurs. Thanks
  4. If I want text to be positioned 80% below the top of the page and 30% away from the left side of the page (for example), how could i write this out with css? I didnt want to use pixels because I heard they arent the same for all screen resolutions and using percentages will adjust to any screen, is this true? Thanks
  5. When you say to post this: <?php else echo "<br><br><center><h1>Error:</h1>Incorrect Password!</center>"; ?> <style type='text/css'> body { background-color: color; } </style> <? if you have more stuff here ?> did you intentionally not write a beginning <?php before the sentence "<style type...." and an ending ?> after the ending </style> tag?? Thanks
  6. This is the code I have if a user enters the wrong password into the basic username and password field, <?php else echo "<br><br><center><h1>Error:</h1>Incorrect Password!</center>"; ?> How can I give this page a background image, using css? Where would i put the code? Thanks
  7. If a user enters either the wrong username or password, what would the code be to have "Invalid name or password" pop up on the same page?
  8. so what exactly does $row['username'] do and mean? is there a replacement code I could enter and test? thanks
  9. My first page only has the basic features so far: (posted below) <html> <body> <form action = 'login.php' method = 'POST'> Username: <input type='text' name = 'username'><br> Password: <input type = 'password' name = 'password'><br> <input type = 'submit' value = 'Log in'> </body> </html> But i keep getting that same error
  10. I am creating a login page for a web and i keep getting the error posted below: Notice: Undefined index: username in C:\xampp\htdocs\login.php on line 26 Notice: Undefined index: password in C:\xampp\htdocs\login.php on line 27 Incorrect password This is the code i have listed in my login.php document : <?php if( isset($_POST['submit']) && $_POST['Log in']) session_start(); $username = $_POST ['username']; $password = $_POST ['password']; if ($username&&$password) { $connect = mysql_connect ("localhost","root","") or die("Couldn't Connect"); mysql_select_db("database") or die ("Couldn't find db"); $query = mysql_query("SELECT * FROM users WHERE username = '$username'"); $numrows= mysql_num_rows($query); if ($numrows!=0) { while($row = mysql_fetch_assoc($query)) { $dbusername = $row['username']; $dbpassword = $row['password']; } if ($username==$dbusername&&$password==$dbpassword) { echo "You're in!<a href='member.php'>Click here to enter the member page.</a>"; $_SESSION['username']=$username; } else echo "Incorrect password"; } else die("That user doesn't exist!"); } else die("Please enter a username and a password!"); ?> Can anyone help me please??
×
×
  • 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.