Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-18-2004, 04:07 AM   #1
Member (7 bit)
 
rcx21000's Avatar
 
Join Date: Feb 2004
Posts: 102
HTML Form

I have a login html form:

Quote:
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
< html >
< head >
< title >< /title >
< /head >
< body >
< div align="center" >< h1 >GP Download< /h1 >< /div >< br >< br >
You aren't logged in. Please login.< br >
< form action="logingin.php" method=get >
Username: < input type="text" name="username" >< b r>
Password: < input type="password" name="password" >< br >< br >
< input type="submit" name="submit" value="Login" >
< /form >
< /body >
< /htm l>
(yes, I know get isn't good for logins, but this is just for testing)

logingin.php:

Quote:
< ?php setcookie("login", $_GET[username] . " " . $_GET[password]); ? >
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
< html >
< head >
< title>< /title >
< meta HTTP-EQUIV="REFRESH" content="2; url=search.php" >
< /head >
< body >
Loging in... Please wait.
< /body >
< /html >
The cookie is only saved if I goto logingin.php?username=rcx21000&password=password_here, but if I use the login form, it doesn't work. Also, when I use the login from, the URL only shows logingin.php (w/o the get info).

EIDT: Grrrr... It was actually doing the HTML, and redirecting to search.php I put spaces...

Last edited by rcx21000; 04-18-2004 at 04:13 AM.
rcx21000 is offline   Reply With Quote
Old 04-18-2004, 10:57 AM   #2
Member (13 bit)
 
DrZaius's Avatar
 
Join Date: Jul 2000
Location: Fullerton, CA
Posts: 7,030
Hi rcx21000,

Try using:
PHP Code:
<?php setcookie("login"$_GET[$username] . " " $_GET[$password]); ?>
Also, you can post code here by using the PHP tag. Hope this helps.
DrZaius is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:52 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2