If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > user log in question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-05, 07:06
tg5769 tg5769 is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
Smile user log in question

Hi Everyone

I am new to website creating and am going along pretty steady with Dreamweaver8, php and mysql.

I have been able to create a log in page for advertisers who wish to sell their goods, they log in with 'username' and 'password'.

I now want to be able to display thier total amount of adverts as soon as they have logged in.
Example:
Adverts live = '?'

How do I do this, I think it is with sessions but really need some help on how to set it all up.

Any advice or links would be great!

Thank you
Reply With Quote
  #2 (permalink)  
Old 12-12-05, 08:15
jfulton jfulton is offline
Registered User
 
Join Date: Apr 2005
Location: Baltimore, MD
Posts: 297
Could you try to explain your problem a little better? What are adverts? Are they a field in a database table? If so, could you post the structure of all the tables involving them? If not, what do they do? etc., etc...
Reply With Quote
  #3 (permalink)  
Old 12-12-05, 10:14
tg5769 tg5769 is offline
Registered User
 
Join Date: Dec 2005
Posts: 6
No probs

Basically it is a property website where agents can list their properties for sale.
I have a table in place for all the fields regarding registration, I also have a log in page where agents will be able to log in to view all their properties.
They log in using their username and password which then checks against the table.

I want to be able to do it so once they have logged in it will show them how many property adverts they have listed, price etc.

I also have the table created for all fields regarding the property particulars, now im stuck on how to show each agents property listings when they log in.

Thank you
Reply With Quote
  #4 (permalink)  
Old 12-12-05, 19:20
jfulton jfulton is offline
Registered User
 
Join Date: Apr 2005
Location: Baltimore, MD
Posts: 297
You need to get a join on the tables. In the simplest form you would probably want to do something like
Code:
SELECT * 
FROM Properties p, Agents a
WHERE p.AgentID = a.AgentID
AND a.AgentID = currentAgentID
It's hard to really know without any idea of how your database is structured.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On