Jump to content

Country on Register Form


eaglelegend

Recommended Posts

Hi, I would like to intergrate the new country selection (previously location) and I want to intergrate it with minimal errors, can anyone help me please?

 

here is the form I would like to intergrate to my current register form..

<?php

include("./flag.cls.php") ;

// initialize the class FLAG
$flag = new FLAG() ;

// create the form to use the input button
echo "<form action='./index.php' method='POST'>" ;

// display the flag from the id
$flag->DisplayFlag($_POST['country']);
echo "<br><br>" ;

// display the combo box with all the name of the country
$flag->comboland($_POST['country']) ;

echo "<br><br>" ;

// return the name of the country from the id
$name = $flag->GetCountryNameById($_POST['country']) ;
echo  $name ;

echo " ----> " ;

// return the id of the country from the name
echo $flag->GetCountryIdByName($name) ;

// display the input button
echo "<br><br><input type='submit' name='submit' value='Submit'>" ;

// close the form tag
echo "</form>" ;

?>

 

my register form...

<?php @include_once( "/stats/inc.stats.php" ); ?>

<?php

$page_title = "Register";
$rank_check = 0;
include "header.inc.php";

if (!$remember_day) { $remember_day = "DD"; }
if (!$remember_month) { $remember_month = "MM"; }
if (!$remember_year) { $remember_year = "YYYY"; }
if ($remember_gender == 1) { $rememberFemale = " SELECTED"; } else { $rememberMale = " SELECTED"; }

function getAvatarList($username='')
{
   global $findProfile;

   $a = "<option value='blank.gif'>Select Avatar</option>";

   $q = mysql_query("SELECT * FROM `avatar` WHERE `SECRET` = '0' AND `MEMBER_USERNAME` = '0'");
   while($f=mysql_fetch_array($q))
   {
      $a .= "<option value='$f[iMAGE]'";
      if ($findProfile['avatar_selected'] == $f['IMAGE']) $a .= " selected";
      $a .= ">$f[NAME]</option>";
   }

   return $a;
}



print "$openHTML";

ECHO <<<END

<P align="center"><FORM ACTION=$base_url/register.pro.php?game=$game METHOD=POST>
   <CENTER><FONT SIZE="-2" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1">
   - Information checked with a red star means that information<BR>
   is required to register here on Pet Game!</FONT>

   <P><TABLE CELLSPACING=0 CELLPADDING=0 WIDTH=400>
      <TR>
         <TD COLSPAN=2 BGCOLOR="$topAndBottomBG">
            <P><FONT SIZE="-1" COLOR="$topAndBottomText"><B>Account
            Information:</B></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Username:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; 16 Char. Limit<BR>
            &#149; a-z and 0-9 only!<BR>
            &#149; </FONT><A HREF="javascript:;" onclick="window.open('check_names.php?game=$game','checknames',config='height=250,width=250,menubar=no,resizable=yes,directories=no,scrollbars=no,status=yes,toolbar=no');     return false;"><FONT SIZE="-1">See
            if it's available!</FONT></A></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_username" VALUE="$remeber_username" SIZE=32 MAXLENGTH=16></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Display Name:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; 20 Char. Limit<BR>
            &#149; Same as username, Add spaces and CaPs!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_display_name" VALUE="$remember_display_name" SIZE=32 MAXLENGTH=20></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Password:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; CaSe SenSitIVe!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=password NAME="reg_pass1" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Confirm Password:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT><FONT SIZE="-1"><BR>
            &#149; CaSe SenSitIVe!<BR>
            &#149; Must Match previous password!</FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=password NAME="reg_pass2" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Referer:
            </B></FONT><FONT SIZE="-1"><BR>
            &#149; Did someone send you here? Give them credit! Plus pick up a few bonus points </FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="referer" SIZE=32 VALUE="$HTTP_COOKIE_VARS[referer]"></P>
         </TD>
      </TR>
   </TABLE>
   </P>

   <P><TABLE CELLSPACING=0 CELLPADDING=2 WIDTH=400>
      <TR>
         <TD COLSPAN=2 BGCOLOR="$topAndBottomBG">
            <P><FONT SIZE="-1" COLOR="$topAndBottomText"><B>Personal
            Information:</B></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Full Name:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_full_name" VALUE="$remember_name" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Email Address:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_email" VALUE="$remember_email" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Location:</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_location" VALUE="$remember_location" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Birthday:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_year" VALUE="$remember_year" SIZE=7> <INPUT TYPE=text NAME="reg_month" VALUE="$remember_month" SIZE=4> <INPUT TYPE=text NAME="reg_day" VALUE="$remember_day" SIZE=4>
            </P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Gender:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <SELECT NAME=reg_gender SIZE=2>
               <OPTION value=1$rememberFemale>Female
               <OPTION value=2$rememberMale>Male
            </SELECT></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Avatar:
            </B></FONT><FONT SIZE="-1" COLOR="#FF0000"><B>*</B></FONT></P>
         </TD>
         <TD>
            <P>    <img src="uploads/blank.gif" width=48 height=48 id="avatar">
            <br>    <SELECT NAME="avatar_selected" onChange="document.getElementById('avatar').src = 'uploads/' + this.value;">
END;
                echo getAvatarList($username);
ECHO <<<END
            </SELECT></P>
         </TD>
      </TR>

      <TR BGCOLOR="#FFFFFF">
         <TD WIDTH=130 HEIGHT=20>
            <P><FONT SIZE="-1"><B>Signature:</B></FONT></P>
         </TD>
         <TD>
            <P>    <INPUT TYPE=text NAME="reg_sig" VALUE="$remember_sig" SIZE=32></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=130>
            <P><FONT SIZE="-1"><B>Profile:</B></FONT></P>
         </TD>
         <TD>
            <P>    <TEXTAREA NAME=reg_profile ROWS=6 COLS=34 WRAP=virtual>$remeber_profile</TEXTAREA></P>
         </TD>
      </TR>
   </TABLE>
   </P>

   <P><FONT SIZE="-1">All information is provided here is safe. No
   personal information will ever<BR>
   be sold for any reason. Read our </FONT><A HREF="privacy.php"><FONT SIZE="-1">Privacy
   Policy</FONT></A><FONT SIZE="-1"> for more information.</FONT></P>

   <P><FONT SIZE="-1">By registering an account here you agree to all
   of our </FONT><A HREF="tos.php"><FONT SIZE="-1">Terms and
   Conditions</FONT></A><FONT SIZE="-1">!</FONT></P>
   <P><FONT SIZE="-1"><INPUT TYPE=submit NAME=Submit VALUE="Register My Account Now!!!"></FONT></CENTER>
</FORM></P>

END;

print "$closeHTML";
?>

Link to comment
https://forums.phpfreaks.com/topic/141257-country-on-register-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.