OK, progress, (I think)
I tried this one:
$patterns = array ("/&/","/'/","/Β΄/","/β/","/\"/","/β/","/β/","/β/","/β/","/>/","/</");
$replacements = array ("&","'","'","'",""",""",""","-","-",">","<");
$descr = preg_replace($patterns,$replacements,$descr);
echo $descr;
and it echoed like this:
This is a test account “This is a test” ‘This is a test’
But for some reason whenever there are the curly quotes being input into the description field it states that there was no Band Name (title) listed. I tried moving this statement:
elseif(!$bandName){
from the top to the bottom of the error checking and yet it still states there is no band name whenever curly's are input in ANY field.
I have no idea what's going on here, it's quite frustrating. Here is the entire error-checking part:
if (!$descr){
$error = "Sorry! You must enter a band description.<br>
$please";
include ('errorinc.php');
exit();
elseif ((!$region)||(!$country)){
$error = "Sorry! You must choose a region and country in the Location dropdown menu. If you chose USA you must also choose a State.<br>
$please";
include ('errorinc.php');
exit();
}
elseif (!$location){
$error = "Sorry! You must enter a city or area.<br>
$please";
include ('errorinc.php');
exit();
}
elseif(!$bandName){
$error = "Sorry! You must enter a band or musician's name.<br>
$please";
include ('errorinc.php');
exit();
}
As a test I removed the curly's from the Description and used them in the Band Name and it told me I didn't enter a band name. Why does it always target that variable? Is it because it's the top textfield in the form and first in the POST statements? Essentialy if I use curly's ANYWHERE in the form it tells me that there is no band name. Without curly's the script works fine. π
Please help!