Hoi hope someone can help.
my question is
preg_replace dosn't work 100%
the code i have
$description = preg_replace('/[^a-zA-Z0-9 .,]/', '', ($_POST));
it works with all strange sings but only not when i use sign - between a string like in test-test.
like the code it must remove everyting exept a-z A-Z 0-9 and ., and blank space
then i have the following error
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'test-test/thumbs/thumb083.jpg' for writing: No such file or directory in C:\xampp\htdocs\voor_server_narrengilde\php\login\create_album_prinzenfuhrungen.php on line 772
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'test-test/slides/083.jpg' for writing: No such file or directory in C:\xampp\htdocs\voor_server_narrengilde\php\login\create_album_prinzenfuhrungen.php on line 773
and here i have the code where the line 772 aand 773 is
if (isset($_POST['senden']))
{
$mapbeschrijving = preg_replace('/[^a-zA-Z0-9 .,]/', '', ($_POST ['expl']));
if(mkdir("$mapbeschrijving", 0777)){ if (mkdir("$mapbeschrijving/$slides", 0777)){ if (mkdir("$mapbeschrijving/$thumbs", 0777)){
include "includes/album_Prinzenfuhrungen_angemacht.php";
} }}
else {
echo "Er is iets niet goed gegaan.";
}
$loc1="$slides/$thename";
$loc="$thumbs/$thenames";
$location1="$mapbeschrijving/$slides/$thename";
$location="$mapbeschrijving/$thumbs/$thenames";
imagejpeg($image_p1,$location, 100);
imagejpeg($img,$location1, 100);
unlink($thename);
include "includes/iffile_Prinzenfuhrungen_exist.php";
}
line 12 is line 772 and line 13 is line 773
but it's only when i use - between strings
thanks john