<?php
include 'core/head.php';
if (!empty($_POST['submit'])) {
$load= htmlspecialchars($_POST['load']);
$pass = htmlspecialchars($_POST['pass']);
$pieces = explode(" ", $load);
$nick = $pieces[0]; // кусок1
$email = $pieces[1]; // кусок2
/* $loa = preg_split("/[\s,.@]+/", $load);
$arr = 'gmail';
if (in_array($arr, $loa)) {
$true = 'email';
} else {
$true = 'nick';
}
*/
}
echo '<form action="test.php" method="post">';
echo '<input class="input" type="text" name="load" placeholder="логин">';
echo '<input class="input" type="password" name="pass" placeholder="Пароль">';
echo ' <input name="submit" type="submit" class="load" value="Регистрация">';
echo '</div>';
echo '</form>';
// echo $true.': '.$load.'<br>pass: '.$pass;
echo 'nick: '.$nick.'<br>';
echo 'email: '.$email.'<br>';
echo 'pass: '.$pass;
?>