Zrobiłem coś takiego: jeżeli jest prawidłowo wpisany w formularzu username to wyskakuje 2 razy a ma wyskakiwać raz echo : ma pisać step one completed itd i adres url a na stronie powtarza te wpisy dwukrotnie i nie wiem dlaczego: wygląda to tak : step one completed itd... adres url z drugiego echa i znowu step one completed i adres url
<?
if (empty($_GET['submit']) && !eregi(" ",$username)){
$homepath = "/home2/lopez86100/domains/easywebcity.com/public_html/article/";
$filesdi = "/home2/lopez86100/domains/easywebcity.com/public_html/add/";
$cpFiles = array("index.txt","pss.txt");
$username=$_GET['username'];
$templates = $_GET['template'];
$filesdir = $filesdi.$templates;
$userDir = $homepath.$username;
//create the new directory
$newDir = mkdir($userDir, 0777
);
$userDir = $homepath.$_GET['username'];
foreach($cpFiles as $theFile) {
$cpFiles = $cpFiless;
copy($filesdir."/".$theFile,$userDir."/".$theFile); chmod($userDir."/".$theFile,0777);
echo "<div align="center
"><strong>Step one completed !<p>Go to step 2 !</strong></div>";
echo "(http://www.easywebcity.com/$username)"; }
}
if (empty($_GET['submit']) && eregi(" ",$username)){ exit("don't use spaces"); }
?>