Skip to main content
Participant
November 30, 2010
Question

Member Login confusion...please help!

  • November 30, 2010
  • 1 reply
  • 1577 views

I asked this question a few days ago, but probably did not word it well enough to prompt an answer, so I am trying again.

I had an existing website, with no member log in.  I wanted to create a member log in for the site that would open content only members can view, open or download.  I went through some of the tutorials/forums etc to find out how to create the member login.  I created a login.php page in DW.  I logged into phpMyadmin, and tried it out using a php_test database.  I then created a database and a table for my website.  On one of my website pages, I show a link for Member Login.  However, when pressed, it does not go to the login.php page.  I did have it working to go to that page, but it wasn't working - ie it wasn't accessing the database and checking the username/password against the entries.  (Would just return to a blank login.php page). I was doing some things in the server behaviour page, and then it stopped even directing to the login.php page.

My question is this:  Because I had an existing site, with the root file on my local drive, and because the database/table for the login.php page are on the http://localhost, how do I point the page to direct to that lgoin.php, and check data against the table?  I guess my confusion is in the root site/server behaviour side of things - I feel like I have two root sites: one for the existing site, one for the new phpMyadmin stuff (xampp).  Do I change the code on the page where I have a menu entry for the login.php? or do I have to change the server behaviour for login.php to point...where?

This is probably very simple to some of you, but again, I work for a charity with very little money to spend on the website. If you want specifics (file folder names, etc), can I do that off forum?

Thanks for all your help, these forums really are a vaulable tool for people like me, and probably one of the few places we actually get to learnn things.

Sorry, one more thing, I have done the test connection part and got it to work alright.

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
December 1, 2010

cammeg wrote:

I asked this question a few days ago, but probably did not word it well enough to prompt an answer, so I am trying again.

I suspect the reason you didn't get an answer is because your post is as confusing as you are confused. Take a look at How to get help quickly.

Many people make the mistake of giving too little information. Your mistake is that you're giving so much information, it's difficult to see where the question lies. The problem you're having seems to boil down to this:

the database/table for the login.php page are on the http://localhost, how do I point the page to direct to that lgoin.php, and check data against the table?

The answer is that you don't. The purpose of a local testing environment is to make sure that your code works without error before you deploy it on a live website. You need to create a database on your live website using the same structure as in your testing environment. The login page on your live website will then query the correct database.

cammegAuthor
Participant
December 1, 2010

Yes, I realized it was confusing when I went back and read it - probably because I know so little myself, being

self-taught on the fly out of necessity. I freely admit my shortcomings, but I try really hard!  (and I wasn't giving anyone on here a hard time for not answering - I realized it was my question that was the problem).

Anyway, thank you for the answer David - I thought that was the direction I needed to go, but wasn't sure.

I am so glad that there are experts like you, and forums like this, to help people like me.  I know from other threads I have read that 'people like me' irritate some of the people with advanced skills, but I can't tell you how much I have learned from just reading through the Q&A.

Your help is very much appreciated!

Cheers,

Joanne

cammegAuthor
Participant
December 1, 2010

Don't worry about being a beginner, Joanne. Even experts were beginners at one time, and they're not necessarily expert at everything.

The beginners that irritate most experts are those who don't make any effort to learn, or who think that their newfound knowledge turns them into instant experts. Anyone who shows a willingness to learn will normally find there's plenty of help at hand.

Although it can often be difficult to see the wood for the trees when you're confused, try to keep questions focused on one problem at a time. If you find it difficult to explain the problem, try drafting the question in Notepad or TextEdit before posting here. Then you can copy and paste it into the forum.


Thank you, David - I will try to heed your advice, and focus! Yes,

sometimes I don't even know what I am asking! Thanks again.