How to popup a window for user name and password in PHP?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

How to popup a window for user name and password in PHP?

Post by ljCharlie »

I want to create a popup window that ask for User Name and Password in PHP cod. In addition, once the user enter the user name and password to the popup window, how do I capture that information and store it to a cookie?

Any help is grateful!

ljCharlie
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Pop-up widows are a Javascript issue.

Take a look at this in the manual - http://se.php.net/manual/en/function.setcookie.php

Mark
User avatar
Saethyr
Forum Contributor
Posts: 182
Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:

Post by Saethyr »

or you can use .htpasswd to get the generic login window you get on alot of sites.
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

I see. So PHP can create popup window then? If that is true, can PHP capture the information from a javascript popup window and store in a cookie? Or is this also done in javascript?

Thank you,

ljCharlie
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

you could easily popup a window in javascript with a form and POST the data to a php script
anotherJean
Forum Newbie
Posts: 22
Joined: Tue Mar 30, 2004 3:59 pm

Post by anotherJean »

ljCharlie wrote:I see. So PHP can create popup window then? If that is true, can PHP capture the information from a javascript popup window and store in a cookie? Or is this also done in javascript?

Thank you,

ljCharlie
of course PHP can store info in a cookie. this is not related to the form of the window.
zenabi
Forum Commoner
Posts: 84
Joined: Mon Sep 08, 2003 5:26 am
Location: UK

Post by zenabi »

This page could be of some use to you:

http://www.php.net/manual/en/features.http-auth.php
ljCharlie
Forum Contributor
Posts: 289
Joined: Wed May 19, 2004 8:23 am

Post by ljCharlie »

Thank you all your help.

ljCharlie
Post Reply