Ok i am a NEWBIE.
I am trying to create a php pledge website for my church.
I have the Login Page completed ?
I have the database completed
Database has 2 tables
login----> loginid, username, password
pledge ------> pledgeid, fname,lname, addy, city,state,pledge and loginid
what i am trying to do is when a person logs in say mary she will see her pledges and not everyones.
what is happening is when mary logs in she see every pledge
Help Please any help Newbie and i want to Learn
Moderator: General Moderators
Re: Help Please any help Newbie and i want to Learn
What is the query that you are currently using?
Re: Help Please any help Newbie and i want to Learn
It looks like you should have all the user data in the login table, not the pledge table. It should look like this:r2ks wrote:Ok i am a NEWBIE.
I am trying to create a php pledge website for my church.
I have the Login Page completed ?
I have the database completed
Database has 2 tables
login----> loginid, username, password
pledge ------> pledgeid, fname,lname, addy, city,state,pledge and loginid
what i am trying to do is when a person logs in say mary she will see her pledges and not everyones.
what is happening is when mary logs in she see every pledge
Code: Select all
[b]login[/b]:
loginid
username
password
fname
lname
addy
city
state
[b]pledge[/b]:
pledgeid
loginid
pledgeamt
pledgedateAs to your question about what data to show, when someone logs in, you will have their loginid, and since that's a field in the pledge table, you just use the WHERE clause of the query to limit the results to records with that loginid in them.
Re: Help Please any help Newbie and i want to Learn
I am confused i am looking at what you wrote it makes sence but how would the why would the username and password be associated to the Pledge.
Mike logs in he wants to add he has taken a pledge from Mary, steve, and will,
mikes username has to be associated to mary,steve, and will and any other pledge he gets ??
looking at the database it does not look right i am new so please forgive me if i am wrong
Thank you
Mike logs in he wants to add he has taken a pledge from Mary, steve, and will,
mikes username has to be associated to mary,steve, and will and any other pledge he gets ??
looking at the database it does not look right i am new so please forgive me if i am wrong
Thank you