Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. ?>
  2.  
  3. <!doctype html public "-//w3c//dtd html 3.2//en">
  4.  
  5.  
  6.  
  7. <html>
  8.  
  9.  
  10.  
  11. <head>
  12.  
  13. <title>(Type a title for your page here)</title>
  14.  
  15. <meta name="GENERATOR" content="Arachnophilia 4.0">
  16.  
  17. <meta name="FORMATTER" content="Arachnophilia 4.0">
  18.  
  19. </head>
  20.  
  21.  
  22.  
  23. <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
  24.  
  25. <?
  26.  
  27. if(isset($todo) and $todo=="post"){
  28.  
  29.  
  30.  
  31. $status = "OK";
  32.  
  33. $msg="";
  34.  
  35.  
  36.  
  37. // if userid is less than 3 char then status is not ok
  38.  
  39. if(!isset($userid) or strlen($userid) <3){
  40.  
  41. $msg=$msg."User id should be =3 or more than 3 char length<BR>";
  42.  
  43. $status= "NOTOK";}
  44.  
  45.  
  46.  
  47. if(mysql_num_rows(mysql_query("SELECT userid FROM plus_signup WHERE userid = '$userid'"))){
  48.  
  49. $msg=$msg."Userid already exists. Please try another one<BR>";
  50.  
  51. $status= "NOTOK";}
  52.  
  53.  
  54.  
  55.  
  56.  
  57. if ( strlen($password) < 3 ){
  58.  
  59. $msg=$msg."Password must be more than 3 char legth<BR>";
  60.  
  61. $status= "NOTOK";}
  62.  
  63.  
  64.  
  65. if ( $password <> $password2 ){
  66.  
  67. $msg=$msg."Both passwords are not matching<BR>";
  68.  
  69. $status= "NOTOK";}
  70.  
  71.  
  72.  
  73.  
  74.  
  75. if ($agree<>"yes") {
  76.  
  77. $msg=$msg."You must agree to terms and conditions<BR>";
  78.  
  79. $status= "NOTOK";}
  80.  
  81.  
  82.  
  83. if($status<>"OK"){
  84.  
  85. echo "<font face='Verdana' size='2' color=red>$msg</font><br><input type='button' value='Retry' onClick='history.go(-1)'>";
  86.  
  87. }else{ // if all validations are passed.
  88.  
  89. $query=mysql_query("insert into plus_signup(userid,password,email,name,sex) values('$userid','$password','$email','$name','$sex')");
  90.  
  91. echo "<font face='Verdana' size='2' color=green>Welcome, You have successfully signed up<br><br><a href=login.php>Click here to login</a><br></font>";
  92.  
  93. }
  94.  
  95. }
  96.  
  97. ?>
  98.  
  99.  
  100.  
  101. </body>
  102.  
  103.  
  104.  
  105. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement