modif towns
This commit is contained in:
		
							
								
								
									
										23
									
								
								nationschainssave/tribes/smatchit/www/presentation/save.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								nationschainssave/tribes/smatchit/www/presentation/save.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| <?php | ||||
|     $email = $_POST['email']; | ||||
|     $user_type = $_POST['user_type']; | ||||
|     $date = date('d/m/Y');  | ||||
|  | ||||
|     $fp = fopen('_emails.csv', 'a'); | ||||
|     if (flock($fp, LOCK_EX)) | ||||
|     {     | ||||
|         fputcsv($fp, array($email,$user_type,$date)); | ||||
|  | ||||
|         flock($fp, LOCK_UN); // unlock the file | ||||
|         $response = true; | ||||
|  | ||||
|     } else { | ||||
|         // flock() returned false, no lock obtained | ||||
|         //print "Could not lock $filename!\n"; | ||||
|         $response = false; | ||||
|     } | ||||
|      | ||||
|     fclose($fp); | ||||
|  | ||||
|     echo $response; | ||||
| ?> | ||||
		Reference in New Issue
	
	Block a user