/    Sign up×
Community /Pin to ProfileBookmark

Register/Login Scripts.

Hi, I’m kind of new to PHP, I’ve tried learning it but I really don’t have the time to sit down and study it for hours a day. I was wondering if anyone could give me a register/login script for me to use on my site. So far it’s just made from html, but I want to give the users more to do on it.

Thanks for any help I may get from this post.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@Sid3335Mar 02.2007 — not sure too many people will just give you scripts becuase you "don't have time".

but, heres a really simple script to start you off

[code=php]
<?php
session_start() ;
if ($_POST)
{
if ($_POST['username'] == "admin" && $_POST['password'] == "pass")
{
$_SESSION['logged'] = true ;
}
else
{
echo "incorrect details<br>" ;
}
}
if ($_SESSION['logged'])
{
die("you are logged in") ;
}
?>
<html>
<head>
</head>

<body>

<form id="form1" name="form1" method="post" action="">
<p>
<input type="text" name="username" />
Username
</p>
<p>
<input type="password" name="password" />
Password</p>
<p>
<input type="submit" value="Submit" />
(username and password are &quot;admin&quot; and &quot;pass&quot;)
</p>
</form>

</body>
</html>
[/code]


doesn't get much simpler than that, but its something to work with
Copy linkTweet thisAlerts:
@MrCoderMar 02.2007 — its amazing what 3 words can do in google:

http://www.google.co.uk/search?source=ig&hl=en&q=php+login+script+tutorial[/QUOTE]


Does PHP count as a word?

If so is it 3 or 4 words?
Copy linkTweet thisAlerts:
@knowjMar 03.2007 — its arguable as I'm not sure if PHP holds its acronym now.

it used to be Personal Home Page but its come a LONG way since then and it's a lot more than what its inventor intended
Copy linkTweet thisAlerts:
@benifactorMar 03.2007 — i believe now that is stands for "pre-Hypertext processor"... so five words ? or 3 words and an acronym ?
×

Success!

Help @superjon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...