I’m trying to make a login script.
I downloaded mysql, xampp, wamp.
Already had filezilla.
I started off messing around in xampp control panel
trying to figure out how to make a database so i can make a table for username, password.
I installed phpmyadmin finally got it to accept my host, user, pass
then i realize i see this error in localhost/phpmyadmin
Error
SQL query: DocumentationEdit Edit
SELECT tables
FROM phpmyadmin.pma_recent
WHERE username = ‘root’
MySQL said: Documentation
1142 – SELECT command denied to user ”@’localhost’ for table ‘pma_recent’
I’m really frustrated.
I want to uninstall everything and restart but i don’t know exactly what to download.
After i uninstall everything should i just download xampp as i hear it comes with mysql, phpmyadmin or what?
I think im having trouble because i can only find outdated tutorials on how to make login scripts, and also everybody uses different webservers or w/e.
I also need help understanding this code…
should i leave localhost as it is?
?? user pass
$conect = mysql_connect(“localhost”, “root”, “123”)
mysql_select_db”whatsmydb?”
Would i replace whatsmydb? with users?
This is what i see under databases
information_schema Check Privileges Check Privileges
mysql Check Privileges Check Privileges
performance_schema Check Privileges Check Privileges
sakila Check Privileges Check Privileges
test Check Privileges Check Privileges
users Check Privileges Check Privileges
world Check Privileges Check Privileges
Total: 7
The more and more i try the more and more i get confused LOL
Can someone please help me create a login script and
what should i use to create it?
Does anyone have a new tutorial for mysql5.5?
Why am i getting this error?
How do i setup a table containing usernames passwords?
I am toooo confused where shall i start?!?!?!!?!?!?
You have not included the PHP tag for this and it sounds like you’re trying to use PHP connection code to access a MySQL database. You need to first understand a couple concepts with your server environment.
Okay let’s start with PhpMyAdmin and creating your first database:
If you click the “house” icon on the left you will be on the home screen and you will see a form field in the main content area you can type in a database name and “Create New Database” then click “Create”. Type in myfirstdb if that is the name of the database and click “Create”
This will refresh the column to the left and there is a drop-down (combo) menu that displays the database names (like the ones you mentioned). You should now see myfirstdb listed there too. Select it.
Now you will see very little content but in the right main content area at the bottom is a form field that allows you to create a table name and determine how many fields it has. Type in users and select 4 as the number of fields. Then click “Go” to the far right.
A form displays 4 rows and you must name your fields (columns) and I suggest you name the following and choose the following data types:
password VARCHAR(24)
be sure to check the small key icon next to the id field to declare it as primary key. Then click “Go” to create your table users.
Congratulations, you’ve created your first table. Now if you’re feeling brave, you could skip these steps and click the “SQL” tab in PhpMyAdmin and paste the following SQL code and it will create the table as well:
The code you were trying in your question is PHP code to connect to a database. Here is an example of a proper connection assuming you followed the instructions above:
Note that we have not stored any data into your table, so you can click the “Insert” tab in PhpMyAdmin for that selected users table and insert rows, or you can insert them using SQL. Example SQL to insert a couple users (click the SQL tab and paste this):
From here you really need to read some tutorials online step-by-step to create an application. Your login script will require HTML programming for your form, then PHP programming to receive the form submission, then PHP + SQL programming to check the user against the database. Search for an example and use these basics to create what you need.
** added bonus for your generous rating **
Check this out:
– http://www.html-form-guide.com/php-form/php-login-form.html
– http://www.phpeasystep.com/phptu/6.html (might be better)