YourPaste - For your paste! Archive - Tools - Login

Posted by test on Mon 23 Jun 2008 18:51 120 views - Syntax: PHP - Expires: never - Report - IMG - Download -

  1. <font face="arial"><?
  2.  
  3.  
  4. $leeg = "";
  5.  
  6. if ($p == $leeg)
  7. {
  8.  
  9. echo "<form method='POST' action='voegtoe.php'><input type='hidden' name='p' value='new'>
  10. What's your username:<br><input type='text' name='login' size='20' maxlength='20'> <font size='1'>Only capitals and normal letters are allowed.</font><br>
  11. Give the month:<br><input type='text' name='month' size='20' maxlength='20'> <font size='1'>In words only (eg. February, January, ...</font><br>
  12. Give your chest-width:<br><input type='text' name='chest' size='20' maxlength='20'> <font size='1'>Only digits are allowed.</font><br>
  13. Give your biceps-width:<br><input type='text' name='biceps' size='20' maxlength='20'> <font size='1'>Only digits are allowed.</font><br>
  14. Give your body-weight:<br><input type='text' name='weight' size='20' maxlength='20'> <font size='1'>Only digits are allowed.</font><br>
  15. <input type='submit' name='B1' value='Add'></form>
  16. ";
  17.  
  18. }
  19. elseif ($p == "new")
  20. {
  21.         include("gegevens.php");
  22.  
  23.         for ($var = -1; $var <= $aantal; $var++ )
  24.         {
  25.                 if ($login == $member[$var])
  26.                 {
  27.                         $file = fopen("Sample/$login.csv","a+");
  28.                         fputs ($file,"
  29. \"$month\",\"$chest\",\"$biceps\",\"$weight\"");
  30.                         fclose($file);
  31.                         $check="a";
  32.                         break;
  33.                        
  34.                 }
  35.                 else
  36.                 {
  37.                         $file = fopen("Sample/$login.csv","w");
  38.                         fputs ($file,"
  39. \"$month\",\"$chest\",\"$biceps\",\"$weight\"");
  40.                         fclose($file);
  41.                         $check="b";
  42.                 }
  43.         }
  44.  
  45.  
  46.         if($check=="b")
  47.         {
  48.                 $aantal++;
  49.                 $file = fopen("gegevens.php","w");
  50.                 fputs ($file,"<?");
  51.  
  52.                 for ($var = -1; $var <= $aantal; $var++)
  53.                 {
  54.                         fputs($file,"\$member[$var] = \"$member[$var]\";");
  55.                 }
  56.  
  57.                 fputs ($file,"\$member[$aantal] = \"$login\";\$aantal = $aantal;?>");
  58.                 fclose($file);
  59.         }
  60.         echo "Volgende gegevens zijn toegevoegd:<br><br>Username: $login<br>Month: $month<br>Chest-width: $chest<br>Biceps-width: $biceps<br>Body-weight: $weight";
  61. }
  62.  
  63. ?></font>

Comments


Name:
Comment:

© 2010 YourPaste.net - Disclaimer