1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What do I use instead of Iframes for a login box.

Discussion in 'Programming' started by Stephen Wolfe, Jan 25, 2011.

  1. #1
    I have a few pages for my login and I would like to display them on the top cornet of my screen.

    I use to use iframes years ago, but i could of swan divs is the way to do it now.

    I can do a include ("login.php"); in a div but when you submit it it redirects of success.php when i want it to just refresh the div.


    any ideas?
     
    Stephen Wolfe, Jan 25, 2011 IP
  2. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #2
    PHP include is definitely the way to go now, steer clear of iFrames whenever possible. What is your code for the form submission? Where do you want the form to redirect you when it is submitted? And can you please clarify what you mean by it redirects of success.php?
     
    jeremyhowell, Jan 25, 2011 IP
  3. Stephen Wolfe

    Stephen Wolfe Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ok ill try to explain a little more,

    I have a login script that create a session, what i have is the login form on the main page of my website which when u use it depending on weather or not it logins or or fails it takes you to another page.

    What i want it to do is bring u back to the current page u where on, and have it display that you are logged in.
     
    Stephen Wolfe, Jan 25, 2011 IP
  4. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #4
    Can you set the action of the form to the index page and just handle the login from there? So if not logged in, display form, if logged in display user account?
     
    jeremyhowell, Jan 25, 2011 IP
  5. Stephen Wolfe

    Stephen Wolfe Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    oh yea i new i had done that before, like this...


    if (!isset($session)){

    <div id="login">sdsds</div>

    }
    else{
    <div id"logged in">welcome></div>

    }


    somthing like that?


    Also I have just got a wired problem with my meun script
    ill post it in a new thread but think you can have a look for me?
     
    Stephen Wolfe, Jan 25, 2011 IP
  6. jeremyhowell

    jeremyhowell Member

    Messages:
    379
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    45
    #6
    Yeah man, your on to it.

    Probably best to start a new thread, you know, keep the Mods happy. :)

    Just PM me the link when you start it and I'll have a look.
     
    jeremyhowell, Jan 25, 2011 IP
    Stephen Wolfe likes this.
  7. andyzzz

    andyzzz Peon

    Messages:
    226
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Does anyone see where this kid is going with this?
     
    andyzzz, Jan 25, 2011 IP
  8. ukescuba

    ukescuba Peon

    Messages:
    91
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    @op you might want to take at something like WP or Joomla - will probably save you a lot of headaches in the long run...
     
    ukescuba, Jan 26, 2011 IP