Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
I've written the following code:Code: Select all
<?
mysql_connect("localhost","whatever","whatever") or die(mysql_error());
mysql_select_db("eyalros_test") or die(mysql_error());
if (isset($email)) {
//check if email is good
//????? how do i do that?? i better ask DevNetworks forum!
//check if password is good
$query=mysql_query("SELECT * FROM artists WHERE artist_email='$email'");
$mypass=mysql_result($query, 0, artist_password);
$password=md5($password);
echo $mypass . "<hr>";
echo $password . "<hr>";
if ($mypass==$password) {
echo "You are allowed to get in!";
}
else
{
echo "Good E-mail. Bad Password.";
}
}
else
{
?>
<form action="<? $PHP_SELF; ?>" method="get">
<H1>Login</h1>
E-mail <input type="text" name="email" /><BR>
Password: <input type="password" name="password" /><br>
<input type="submit" />
</form>
<?
}
?>or if you know any better way to do a login panel, i'm would be happy to learn as a just started PHP developer.
Thanks,
Eyal
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]