Jump to content
MakeWebGames

My Register and Login Page


Poldar
 Share

Recommended Posts

I've been working on a script for my Affiliate Marketing site...

And I made my login page, and I have been working on my register page..

And Zend Studio, which uses a syntax highlight, is not highlighting my coding, so I think their maybe something wrong.

This script is part of Torch Productions, so if you're interested PM me or MSN me at [email protected]

Well here is the register page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Game Credo</title>
<link href="file:///C|/wamp/www/Game Credo/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
[img=gamecred1.jpg]
";
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
   ?  $_SERVER['HTTP_X_FORWARDED_FOR']
   :  $_SERVER['REMOTE_ADDR'];
if(file_exists('ipbans/'.$ip))
{
die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>");
}
require "mysql.php";
global $c;
if($_POST['username'])
}
$username=$_POST['username'];
$username=str_replace(array("<", ">"), array("<", ">"), $username);
$q=mysql_query("SELECT * FROM users WHERE username='{$username}'",$c);
if(mysql_num_rows($q))
{
print "Username already in use. Choose another.";
}
else if($_POST['password'] != $_POST['cpassword'])
{
print "The passwords did not match, go back and try again.";
}
$ip = ($_SERVER['HTTP_X_FORWARDED_FOR'])
   ?  $_SERVER['HTTP_X_FORWARDED_FOR']
   :  $_SERVER['REMOTE_ADDR'];
}
mysql_query("INSERT INTO users (username, userpass, gamecredits, gender, signedup, email,  lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm,  1, 1, 0, 'Male', unix_timestamp(), '{$_POST['email']}',  '$ip')", $c);
$i=mysql_insert_id($c);
}
print "<h3 align="center">You have signed up!Login and start completing offers!</h3>

> [url='login.php']Login[/url]";
}
else
{
print "<h3>Welcome to Game Credo! Below is the Registration Form!</h3>";
print "<form action=register.php method=post>Username: <input type=text name=username>

Password: <input type=password name=password>

Confirm Password: <input type=password name=cpassword>

Email: <input type=text name=email>

<input type=submit value=Submit></form>

> [url='login.php']Go Back[/url]";
}
print "
</body>
</html>

 

And here is the login page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Game Credio Login</title>
<link href="file:///C|/wamp/www/Game Credo/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>


</p>


</p>


</p>
<table width=80% align="center">
 <tr>
   <td><fieldset>
     <legend>Login</legend>
     ";
     print "
     <form action=authenticate.php method=post name=login onsubmit=\"return saveme();\">
       Username:
       <input type=text name=username />


       Password:
       <input type=password name=password />


       Remember me?

       <input type=\"radio\" value=\"ON\" name=\"save\" />
       Yes
       <input type=\"radio\" name=\"save\" value=\"OFF\" checked />
       No
       <input type=submit value=Submit />
       </form>
   </fieldset></td>
 </tr>
</table>


 </p>
</body>
</html>

I hope you guys can help, this is my first custom made and completely my own work..

Thanks :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...