Register for your free account! | Forgot your password?

You last visited: Today at 14:46

  • Please register to post and access all features, it's quick, easy and FREE!


[Help] register.php

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 370
Received Thanks: 135
[Help] register.php

why would my register script not insert the ip of the registured user. this and one more thing stats.php is preventing me from opening =/





Knight^Hawk is offline  
Old 04/05/2010, 01:04   #2
 
elite*gold: 0
Join Date: May 2009
Posts: 1,175
Received Thanks: 533
i thought you got someone to help you...?


.Ash is offline  
Old 04/05/2010, 01:12   #3
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,483
Received Thanks: 887
that was nothing to do with main register page
go to register.php in pages folder..edit from there..

if i remember this the code to get the ip..
Code:
$SERVER[REMOTE_HOST]
PraDevil[ELITE] is offline  
Thanks
1 User
Old 04/05/2010, 04:27   #4
 
elite*gold: 0
Join Date: Dec 2009
Posts: 370
Received Thanks: 135
Quote:
Originally Posted by SpongeBox View Post
i thought you got someone to help you...?
i did but he only knew how to set it up. hes learning himself.

Quote:
Originally Posted by PraDevil View Post
that was nothing to do with main register page
go to register.php in pages folder..edit from there..

if i remember this the code to get the ip..
Code:
$SERVER[REMOTE_HOST]
where do i put this? on what line?


Knight^Hawk is offline  
Old 04/05/2010, 08:01   #5
 
elite*gold: 0
Join Date: Dec 2009
Posts: 370
Received Thanks: 135
i get this error when i put $SERVER[REMOTE_HOST]

Code:
Parse error: syntax error, unexpected T_IF in /home/knight/public_html/pages/register.php  on line 69

fixed first post aswell...
Knight^Hawk is offline  
Old 04/05/2010, 08:04   #6
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,483
Received Thanks: 887
put your register.php in pages folder here..
PraDevil[ELITE] is offline  
Thanks
1 User
Old 04/05/2010, 16:01   #7
 
elite*gold: 246
Join Date: Jan 2008
Posts: 1,712
Received Thanks: 887
@Knight^Hawk I can see you know how to use the edit button. So I must ask you to discontinue double posting. If no one makes a reply to your post you must edit it to add additional information, not make a post after it.

Quote:
Originally Posted by Knight^Hawk View Post
why would my register script not insert the ip of the registured user.
Your register script would not insert the ip of the registered user if your register script never asks for the ip or passes it along to mysql.

Quote:
Originally Posted by Knight^Hawk View Post
i get this error when i put $SERVER[REMOTE_HOST]

Code:
Parse error: syntax error, unexpected T_IF in /home/knight/public_html/pages/register.php  on line 69

fixed first post aswell...
I don't see "$SERVER[REMOTE_HOST]" in the first post spoiler.

It's been a long time since I've done anything in PHP but I assume it would look something like below.
FOR REFERENCE ONLY!
King_Arthur is offline  
Thanks
1 User
Old 04/05/2010, 17:15   #8
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,483
Received Thanks: 887
huhu..im not sure if u like register page without capcha..u can take my register.php then put in pages folder..u can see what are im modified here..learn with it how to add email..php is fun

after u put the new register.php then u will need to design your database account table..go to netbar_ip column then set default to EMPTY STRING

Code:
<?php
include('config.php');
?>
<script type="text/javascript" src="./inc/md5.js"></script>
<form method='post' action='register.php?act=register'>
<b><strong>Please make sure you remember your Account ID and Password</strong></b><hr>
<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="64" valign="top"></td>
<td valign="top">
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr><td><strong>Account ID:</strong></td>
<td width="66%"><input type="text" size="30" maxlength="15" name="id" id="id" title="* Only 4-15 Words/number"></td></tr>
<tr><td><strong>Password:</strong></td>
<td><input class=it id="ipassword" type="password" size="30" maxlength="15" name=pass title="* Only 4-15 Words/number"></td></tr>
<tr><td><strong>Retype Password:</strong></td>
<td><input class=it1 id="ipassword" type="password" size="30" maxlength="15" name=retpass title="* Only 4-15 Words/number"></td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<br /><br />
<TABLE align="center">
<tr><td align="center"><input type="hidden" name="hash"><input class=Butt type=submit onclick="hash.value = login(pass.value)" value='register' name=B1></td></tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?php
                        if($_GET['act'] == "register")
                                {
                                        mysql_select_db($mydbacc);
                                        $userid = trim($_POST['id']);
                                        $password=trim($_POST['pass']);
                                        $passretype=trim($_POST['retpass']);
                                        $hash=$_POST['hash'];
					[COLOR="Red"]$_SERVER['REMOTE_ADDR'];[/COLOR]
                                         if($userid=="" || $password=="" || $passretype=="" )
                                         {
                                                echo "<center>You must fill all information in the Required Field!</center>";
                                         }
                                         else
                                         {
                                             if($password == $passretype)
                                                 {
                                                  if(!ereg("^[0-9a-z]{4,15}$",$userid))
                                                  {
                                                        echo "<center>Only letters and numbers only are allowed.Long 4 to 15 words</center>";
                                                        }
                                                        else
                                                        {
                                                                $res = mysql_query("select * from account where name = '".$userid."' order by id desc");
                                                                if(mysql_num_rows($res) == 0)
                                                                {
                                                                        mysql_query("insert into account (name,Password,Reg_date,[COLOR="Red"]netbar_ip[/COLOR]) values ('".$userid."','".$hash."','".date("y-m-d H:i:s", time())."',[COLOR="Red"]'".$_SERVER['REMOTE_ADDR']."'[/COLOR])");
									echo "<center>Account successfully registered!</center>";
                                                                }
                                                                else
                                                                {
                                                                        echo "<center>This account has been registered, please select another!</center>";
                                                                }
                                                        }
                                                }
                                                else
                                                {
                                                        echo "<center>Password authentication is not the same as your Password</center>";
                                                }
                                        }
                                }
                        ?>
Attached Files
File Type: rar register.rar (1.2 KB, 10 views)
PraDevil[ELITE] is offline  
Thanks
2 Users
Old 04/05/2010, 17:25   #9
 
elite*gold: 0
Join Date: May 2009
Posts: 1,175
Received Thanks: 533
Do you have IP column in your Account table?
.Ash is offline  
Old 04/05/2010, 17:31   #10
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,483
Received Thanks: 887
no
PraDevil[ELITE] is offline  
Thanks
1 User
Old 04/05/2010, 18:47   #11
 
elite*gold: 5
Join Date: Feb 2010
Posts: 1,040
Received Thanks: 437
you should make one :P i have one in mine so that's extremely weird that you don't


~WARNING~ is offline  
Reply



« Help to Changing PKT Prize | [Question]Default Chat Options »

Similar Threads
SRO- where i register?
05/04/2010 - SRO PServer Ask the Experts - 0 Replies
title says it all. EDIT: how i make it english
can not register me
09/11/2008 - SRO PServer Ask the Experts - 1 Replies
have someone a account for me?
register help
07/14/2008 - EO PServer Hosting - 1 Replies
i have a problem with my register script it keeps saying invalid id/password idk what to do
CAN SOME ONE HELP ME REGISTER
04/20/2008 - Dekaron Private Server - 1 Replies
HELP :( WHEN I TRY TO REGISTER AT DEKARON PSERVER I GET AN ERROR :( PLEASE HELP MEEE
EVERYBODY COME AND REGISTER!!
03/31/2008 - CO2 Main - Discussions / Questions - 12 Replies
#Removed by leavemealone



All times are GMT +1. The time now is 14:46.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.