Sure, thanks for replying. I found a workaround, but it seems awfully clunky. The code is to follow.
To sum: When a form is submitted (to the same page), it reads out a confirmation of all the form fields. The apostrophes are fine and it reads correctly on the screen when I use stripslashes(). Then, when it gets re-submittted to another page to do the .txt file and email, I end up with only half my responses if I use an apostrophe (like Harry's instead of Harry's Bar).
I did this, but please do not hesitate to let me know of a more simplified way.
AFTER SUBMITTING FORM FIRST TIME
$Salesperson_Name = stripslashes($Salesperson_Name);
$Salesperson_Name = urlencode("$Salesperson_Name");
$Salesperson_NameX = urldecode("$Salesperson_Name");
I WRITE THE RESPONSE TO THE SCREEN AND PREPARE TO SUBMIT AGAIN (lots of standard form stuff left out)
<form...>
echo "Name of Salesperson(s): $Salesperson_NameX
<input type=hidden name=Salesperson_Name value='$Salesperson_Name'>";
</form>
AFTER SUBMITTING FORM SECOND TIME TO PROCESS EMAIL
<?
$Salesperson_Name = urldecode("$Salesperson_Name");
$admail....
?>
It just seems like a lot of encoding/decoding to get this to work right. I tried to just use urldecode on both pages, but it didn't work.
The above works, but took me all day to do 29 forms. Probably wasted my time, but live and learn 🙂
Thanks for any input!
Geogal