merged
This commit is contained in:
commit
2337aa851e
|
@ -2,7 +2,8 @@
|
|||
include("./includes/header.php");
|
||||
if($_SERVER['REQUEST_METHOD']=="POST"){
|
||||
if($_POST['name']){
|
||||
$username = filter_var($_POST['name'],FILTER_SANITIZE_STRING );
|
||||
$username = filter_var($_POST['name'],FILTER_UNSAFE_RAW);
|
||||
$username_reg = '/^[a-z_][a-z0-9_]{0,30}$/';
|
||||
if(preg_match('/^'.$username.':.*'.'/m',file_get_contents('/etc/passwd') == 1)){
|
||||
$err = "Username already exists!";
|
||||
}
|
||||
|
@ -15,8 +16,8 @@ if($_SERVER['REQUEST_METHOD']=="POST"){
|
|||
}
|
||||
|
||||
if($success){
|
||||
$file = fopen("/var/www/html/user_regs.csv","a");
|
||||
$txt = $_POST['name'].','.$_POST['email'].','.$_POST['ssh'];
|
||||
$file = fopen("/var/varsh/user_regs.csv","a");
|
||||
$txt = $_POST['name'].','.$_POST['email'].','.$_POST['ssh']."\n";
|
||||
fwrite($file,$txt);
|
||||
fclose($file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue