| | |
To create a registration page and login page
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I tried your code (using my own password, username, and dbname). It works on my localhost.
Make sure that you are connecting to the right database and the user and password you're using have access to that database. Did you contact your host for the username, password, and database name?
There really is no other error possible besides the values. I can't provide you with those variables.
Can you access phpMyAdmin?
Make sure that you are connecting to the right database and the user and password you're using have access to that database. Did you contact your host for the username, password, and database name?
There really is no other error possible besides the values. I can't provide you with those variables.
Can you access phpMyAdmin?
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
You can make a test database from there so you can get the database name right. Then add user access.
OR here's a walkthrough...
1. Open your phpmyadmin. The layout has two 'panes'.
2. In the right pane, there is an option to create new database. Type in the name of your sample database there (say, secret-database).
3. Then ignore the other options and just click on the Create button. Your new database will now show-up in the left-pane as secret-database (0) --- this means there are no tables (yet) in your database.
Next, let's add a user to the database.
1. Go back to the phpMyAdmin home page. On the right pane, click on Privileges (it's in the bunch of links below the Create New Database field).
2. You'll see a list of usernames there but let's try and make a new one for now... Click on the Add a new user link.
3. Now type the username you want (ie secret-user).
4. For the host, select Local from the dropdown menu and it will automatically fill-up the text-field.
5. For the password, you choose. =p For this example let's use badpassword.
6. Re-type the password.
7. Ignore the global privileges and just click GO.
8. You'll be sent to a new page (with the Global privileges section) but ignore that and scroll-down to database-specific privileges. On the drop-down menu, Add privileges on the following database: choose secret-database.
9. Then check all the boxes under data (select, insert, update, delete) and at least these three under structure (create, alter, drop).
10. Click Go.
In your dbConfig.php file, use the following values:
Of course, you have to change the values to those you created yourself.
OR here's a walkthrough...
1. Open your phpmyadmin. The layout has two 'panes'.
2. In the right pane, there is an option to create new database. Type in the name of your sample database there (say, secret-database).
3. Then ignore the other options and just click on the Create button. Your new database will now show-up in the left-pane as secret-database (0) --- this means there are no tables (yet) in your database.
Next, let's add a user to the database.
1. Go back to the phpMyAdmin home page. On the right pane, click on Privileges (it's in the bunch of links below the Create New Database field).
2. You'll see a list of usernames there but let's try and make a new one for now... Click on the Add a new user link.
3. Now type the username you want (ie secret-user).
4. For the host, select Local from the dropdown menu and it will automatically fill-up the text-field.
5. For the password, you choose. =p For this example let's use badpassword.
6. Re-type the password.
7. Ignore the global privileges and just click GO.
8. You'll be sent to a new page (with the Global privileges section) but ignore that and scroll-down to database-specific privileges. On the drop-down menu, Add privileges on the following database: choose secret-database.
9. Then check all the boxes under data (select, insert, update, delete) and at least these three under structure (create, alter, drop).
10. Click Go.
In your dbConfig.php file, use the following values:
HTML and CSS Syntax (Toggle Plain Text)
$host = "localhost"; $user = "secret-user"; $pass = "badpassword"; $db = "secret-database";
Of course, you have to change the values to those you created yourself.
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
You said you can access phpMyAdmin... when I asked about that, I meant, you can go to the phpMyAdmin screen which looks like (see the attached screenshot).
phpMyAdmin is sort of a user-friendly interface for working with your databases, it's not your database name.
If you contacted your web host and they told you to use phpMyAdmin, they probably meant that you use that (see screenshot).
phpMyAdmin is sort of a user-friendly interface for working with your databases, it's not your database name.
If you contacted your web host and they told you to use phpMyAdmin, they probably meant that you use that (see screenshot).
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
In your attachment, is this the page you see everytime you enter phpMyAdmin? Can you click on the 'house' button in the left panel to get to a similar window like in my attachment? Because if you can't then your host probably limits your access to creating tables only. =(
WAIT ----
I checked the 000webhost website and:
from the hosting site
You should be able to navigate to the phpMyAdmin homepage! (the one in my screenshot)
By the way, how did you make the _secret table? (kindly describe what you did step-by-step) Because if you made it yourself then most likely, you started at the phpMyAdmin screen similar to my attached screenshot...
To answer your second post, yes I have a 'test-server' installed on my laptop. This is actually a good way to practice your php scripts because you can edit stuff without having to upload them to the internet. If you want to do that too, you can download xampp here.
The installer will do the whole installation for you (yey no configuration necessary!) but if you're stuck on some part of the installation you can ask here.
WAIT ----
I checked the 000webhost website and:
•
•
•
•
You also have access to phpMyAdmin which can be reached from your cPanel, you can also add, edit and modify MySQL privileges, create or drop databases and users, import / export MySQL database data.
You should be able to navigate to the phpMyAdmin homepage! (the one in my screenshot)
By the way, how did you make the _secret table? (kindly describe what you did step-by-step) Because if you made it yourself then most likely, you started at the phpMyAdmin screen similar to my attached screenshot...
To answer your second post, yes I have a 'test-server' installed on my laptop. This is actually a good way to practice your php scripts because you can edit stuff without having to upload them to the internet. If you want to do that too, you can download xampp here.
The installer will do the whole installation for you (yey no configuration necessary!) but if you're stuck on some part of the installation you can ask here.
Last edited by kanaku; Jan 1st, 2009 at 1:25 pm. Reason: I was vague. *eats clarity pills*
If you know ASP, you can save other daniweb members from idiots like me by helping out in this forum.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
Visit this thread if your username starts with one of the following letters: B D F H J L N P R T X Y Z.
![]() |
Similar Threads
- Simple ASP.Net Login Page using C# (C#)
- Updated : Simple ASP.Net Login Page (ASP.NET)
- How to create a login page using ASp.net 2.0 c# (ASP.NET)
- Create a Login page (asp,c#,sql2k5) (C#)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Error message when running ASP login page (ASP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Two font sizes in one DIV?
- Next Thread: CSS not the same in IE as it is in FireFox
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





