Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    6

    Smile Unanswered: 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

  2. #2
    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...

  3. #3
    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

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •