Handle the space used in fax name by adding a dash before it is saved to the database. Then when displaying it remove the dash.

This commit is contained in:
Mark Crane 2015-01-17 17:47:59 +00:00
parent b2c732910a
commit 6ec145b0e4
1 changed files with 7 additions and 1 deletions

View File

@ -210,6 +210,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
}
//replace the spaces with a dash
$fax_name = str_replace(" ", "-", $fax_name);
//escape the commas with a backslash and remove the spaces
$fax_email = str_replace(" ", "", $fax_email);
$fax_email = str_replace(",", "\\,", $fax_email);
@ -572,6 +575,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset ($prep_statement);
}
//replace the dash with a space
$fax_name = str_replace("-", " ", $fax_name);
//remove the backslash
$fax_email = str_replace("\\", "", $fax_email);
@ -1010,4 +1016,4 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the footer
require_once "resources/footer.php";
?>
?>