help me with this regiter form,,, so that user cannot duplicate email and will said "Email address already use" and use only yahoo and google account plsss help me thankz alot
in core.php
in core.php
PHP Code:
function registerform($ef)
{
$ue = $errl = $pe = $ce = "";
switch($ef)
{
case 1:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your username";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 2:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your password";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 3:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Pls type your password again";
$ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 4:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is invalid";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 5:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Password is invalid";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 6:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Passwords dnt match";
$ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 7:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username must be 4 characters or more";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 8:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Password must be 4 characters or more";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 9:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is taken";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 10:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Unknown error pls try again l8r";
break;
case 11:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username must start with a letter from a-z";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 12:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Username is reserved for admins of the site";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 13:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> Please choose an appropriate username";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 14:
$errl = "<img src=\"../images/point.gif\" alt=\"!\"/> U must enter an email address";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
}
$rform = "<form action=\"register.php\" method=\"post\">";
$rform .= "$ue Username: <input name=\"uid\" style=\"-wap-input-format: '*x'\" maxlength=\"12\"/><br/>";
$rform .= "$pe Password: <input type=\"password\" name=\"pwd\" maxlength=\"10\"/><br/>";
$rform .= "$ce Password: <input type=\"password\" name=\"cpw\" maxlength=\"10\"/><br/>";
$rform .= "<img src=\"../images/point.gif\" alt=\"!\"/>Date Of Birth:<br/>";
$rform .= "<select name=\"day\" value=\"01\">";
$rform .= "<option value=\"01\">1</option>";
$rform .= "<option value=\"02\">2</option>";
$rform .= "<option value=\"03\">3</option>";
$rform .= "<option value=\"04\">4</option>";
$rform .= "<option value=\"05\">5</option>";
$rform .= "<option value=\"06\">6</option>";
$rform .= "<option value=\"07\">7</option>";
$rform .= "<option value=\"08\">8</option>";
$rform .= "<option value=\"09\">9</option>";
$rform .= "<option value=\"10\">10</option>";
$rform .= "<option value=\"11\">11</option>";
$rform .= "<option value=\"12\">12</option>";
$rform .= "<option value=\"13\">13</option>";
$rform .= "<option value=\"14\">14</option>";
$rform .= "<option value=\"15\">15</option>";
$rform .= "<option value=\"16\">16</option>";
$rform .= "<option value=\"17\">17</option>";
$rform .= "<option value=\"18\">18</option>";
$rform .= "<option value=\"19\">19</option>";
$rform .= "<option value=\"20\">20</option>";
$rform .= "<option value=\"21\">21</option>";
$rform .= "<option value=\"22\">22</option>";
$rform .= "<option value=\"23\">23</option>";
$rform .= "<option value=\"24\">24</option>";
$rform .= "<option value=\"25\">25</option>";
$rform .= "<option value=\"26\">26</option>";
$rform .= "<option value=\"27\">27</option>";
$rform .= "<option value=\"28\">28</option>";
$rform .= "<option value=\"29\">29</option>";
$rform .= "<option value=\"30\">30</option>";
$rform .= "<option value=\"31\">31</option>";
$rform .= "</select>";
$rform .= "<select name=\"month\" value=\"01-\">";
$rform .= "<option value=\"01-\">Jan</option>";
$rform .= "<option value=\"02-\">Feb</option>";
$rform .= "<option value=\"03-\">Mar</option>";
$rform .= "<option value=\"04-\">Apr</option>";
$rform .= "<option value=\"05-\">May</option>";
$rform .= "<option value=\"06-\">Jun</option>";
$rform .= "<option value=\"07-\">Jul</option>";
$rform .= "<option value=\"08-\">Aug</option>";
$rform .= "<option value=\"09-\">Sep</option>";
$rform .= "<option value=\"10-\">Oct</option>";
$rform .= "<option value=\"11-\">Nov</option>";
$rform .= "<option value=\"12-\">Dec</option>";
$rform .= "</select>";
$rform .= "<select name=\"year\" value=\"1992-\">";
$rform .= "<option value=\"1990-\">1990</option>";
$rform .= "<option value=\"1989-\">1989</option>";
$rform .= "<option value=\"1988-\">1988</option>";
$rform .= "<option value=\"1987-\">1987</option>";
$rform .= "<option value=\"1986-\">1986</option>";
$rform .= "<option value=\"1985-\">1985</option>";
$rform .= "<option value=\"1984-\">1984</option>";
$rform .= "<option value=\"1983-\">1983</option>";
$rform .= "<option value=\"1982-\">1982</option>";
$rform .= "<option value=\"1981-\">1981</option>";
$rform .= "<option value=\"1980-\">1980</option>";
$rform .= "<option value=\"1979-\">1979</option>";
$rform .= "<option value=\"1978-\">1978</option>";
$rform .= "<option value=\"1977-\">1977</option>";
$rform .= "<option value=\"1976-\">1976</option>";
$rform .= "<option value=\"1975-\">1975</option>";
$rform .= "<option value=\"1974-\">1974</option>";
$rform .= "<option value=\"1973-\">1973</option>";
$rform .= "<option value=\"1972-\">1972</option>";
$rform .= "<option value=\"1971-\">1971</option>";
$rform .= "<option value=\"1970-\">1970</option>";
$rform .= "<option value=\"1969-\">1969</option>";
$rform .= "<option value=\"1968-\">1968</option>";
$rform .= "<option value=\"1967-\">1967</option>";
$rform .= "<option value=\"1966-\">1966</option>";
$rform .= "<option value=\"1965-\">1965</option>";
$rform .= "<option value=\"1964-\">1964</option>";
$rform .= "<option value=\"1963-\">1963</option>";
$rform .= "<option value=\"1962-\">1962</option>";
$rform .= "<option value=\"1961-\">1961</option>";
$rform .= "<option value=\"1960-\">1960</option>";
$rform .= "<option value=\"1959-\">1959</option>";
$rform .= "<option value=\"1958-\">1958</option>";
$rform .= "<option value=\"1957-\">1957</option>";
$rform .= "<option value=\"1956-\">1956</option>";
$rform .= "<option value=\"1955-\">1955</option>";
$rform .= "<option value=\"1954-\">1954</option>";
$rform .= "<option value=\"1953-\">1953</option>";
$rform .= "<option value=\"1952-\">1952</option>";
$rform .= "<option value=\"1951-\">1951</option>";
$rform .= "<option value=\"1950-\">1950</option>";
$rform .= "<option value=\"1949-\">1949</option>";
$rform .= "<option value=\"1948-\">1948</option>";
$rform .= "<option value=\"1947-\">1947</option>";
$rform .= "<option value=\"1946-\">1946</option>";
$rform .= "<option value=\"1945-\">1945</option>";
$rform .= "<option value=\"1944-\">1944</option>";
$rform .= "<option value=\"1943-\">1943</option>";
$rform .= "<option value=\"1942-\">1942</option>";
$rform .= "<option value=\"1941-\">1941</option>";
$rform .= "<option value=\"1940-\">1940</option>";
$rform .= "<option value=\"1939-\">1939</option>";
$rform .= "<option value=\"1938-\">1938</option>";
$rform .= "<option value=\"1937-\">1937</option>";
$rform .= "<option value=\"1936-\">1936</option>";
$rform .= "<option value=\"1935-\">1935</option>";
$rform .= "<option value=\"1934-\">1934</option>";
$rform .= "<option value=\"1933-\">1933</option>";
$rform .= "<option value=\"1932-\">1932</option>";
$rform .= "<option value=\"1931-\">1931</option>";
$rform .= "<option value=\"1930-\">1930</option>";
$rform .= "</select><br/>";
$rform .= "Sex:<br/>";
$rform .= "<select name=\"usx\" value=\"M\">";
$rform .= "<option value=\"M\">Male</option>";
$rform .= "<option value=\"F\">Female</option>";
$rform .= "</select><br/>";
$rform .= "Country: <input name=\"ulc\" maxlength=\"100\"/><br/>";
$rform .= " <img src=\"../images/point.gif\" alt=\"!\"/> Email: <input name=\"email\" maxlength=\"50\"/><br/>";
$rform .= "<input type=\"Submit\" name=\"Register\" Value=\"Register\"></form>";
$rform .= "$errl";
return $rform;
}
Comment