Ok i want to add a IP address to the table that the database is already making for registrations forms could someone tell me how to do it :p
<?php
$tabadd=true;
$tabthank=false;
$msg=$Reg_MSG;
$red="#FFFFFF";
$black="#FFFFFF";
$fontc=$black;
$date=date("his");
$code=$date+2*$d;
if($reg){
$checkname=(strlen($user_name));
$sqlusercheck=mysql_query("select username from loginwa_user where username='$user_name' ");
if(!empty($sqlusercheck)){
$numcheck=mysql_num_rows($sqlusercheck);
}
$sqlemailcheck=mysql_query("select email from loginwa_user where email='$reg_email' ");
if(!empty($sqlemailcheck)){
$sqlnumemail=mysql_num_rows($sqlemailcheck);
}
$checkname=(strlen($user_name));
$invalidname=($checkname < 6);
if($invalidname){
$msg=$Reg_Smalname_Error;
$fontc=$red;
}
if(empty($user_name)){
$msg=$Reg_Name_Error;
$fontc=$red;
}
if(empty($first_name)){
$msg=$Reg_First_Name_Error;
$fontc=$red;
}
if(empty($last_name)){
$msg=$Reg_Last_Name_Error;
$fontc=$red;
}
if(empty($pass)){
$msg=$Reg_Pass_Error;
$fontc=$red;
}
if(empty($reg_email)){
$msg=$Reg_Email_Error;
$fontc=$red;
}
else if($sqlnumemail==1){
$msg=$Reg_Email_Exists;
$fontc=$red;
}
else if($numcheck==1){
$msg=$Reg_Name_Exists;
$fontc=$red;
}
else if($pass!=$pass_repeat){
$msg=$Reg_Pass_Agin_Error;
$fontc=$red;
}
else if(empty($newsletter)){
$nl="no";
}else{
$nl="yes";
}
if(preg_match("/ /",$user_name)){
$msg=$Reg_Blank_Error;
}
else if( ($numcheck==0) && ($sqlnumemail==0) && ($user_name) && ($first_name) && ($last_name) && ($pass=$pass_repeat) && (!$invalidname)){
$sql =mysql_query("INSERT INTO loginwa_user ( `userid` , `username` , `fname` , `lname` , `passwd` , `email` , `fcode` , `nl` , `adddate` )
VALUES ( '', '$user_name', '$first_name', '$last_name', '$pass', '$reg_email', '$code', '$nl',NOW())");
$user_id=mysql_insert_id();
$link="$host/activate.php?id=$user_id&email=$reg_email";
$Mail_MSG="$Welcome $user_name\n$Reg_Mail_MSG\nUsername:$user_name\nPasword: $pass\nEmail: $reg_email\n$Reg_Code$code\n$link\n\n$Reg_Mail_ThanknsMSG\n$host";
$send_mail= mail ($reg_email,$Reg_Mail_supject,$Mail_MSG, "From: $adminmail");
$msg=$Reg_Succ_MSG;
$tabthank=true;
$tabadd=false;
}
}
?>
and the html forms are
<table width="400" align="center" border="1" align="left" cellpadding="0" cellspacing="0" >
<td width="400" valign="top" bgcolor="#00202F"><font color="<?php echo"$fontc";?>"><?php echo"$msg";?></font></td>
<tr>
<td width="500"><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><?php echo"$Reg_Name";?></td>
<td width="250"><input name="user_name" type="text" value="<?php echo "$user_name"; ?>" size="20" maxlength="20">
<?php echo"$Reg_Name_Mind"; ?></td>
</tr>
</table></td>
</tr>
<tr>
<td width="500"><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><?php echo"$Reg_First_Name";?></td>
<td width="250"><input name="first_name" type="text" value="<?php echo "$first_name"; ?>" size="20"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="500"><table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><?php echo"$Reg_Last_Name";?></td>
<td width="250"><input name="last_name" type="text" value="<?php echo "$last_name"; ?>" size="20"></td>
and so on... so could someone help me out and show me what i need to add the the forms and to the database table creating so i could insert the persons ip address..thx