Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have you tried use <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURI" rel="nofollow">encodeURI</a>? :</p> <pre><code>var dataString = encodeURI($("#edit_facility").serialize()); </code></pre> <p>If that doesn't works, so take no risks: Try with <a href="http://phpjs.org/functions/htmlspecialchars:426" rel="nofollow">htmlspecialchars</a>.</p> <pre><code>var dataString = htmlspecialchars($("#edit_facility").serialize() , 'ENT_QUOTES') </code></pre> <p>And in your php make:</p> <pre><code>$facility_name = trim($_POST['Facility_Name'])); </code></pre> <p>I hope with that you can solve your problem.</p> <p><strong>EDIT:</strong></p> <p>I was made a test with two files:</p> <p><strong>serialize.php</strong></p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="post"&gt; &lt;/div&gt; &lt;form name="form1" id="form1" action="#"&gt; &lt;p&gt;&lt;input type="text" id="Facility_Name" name="Facility_Name" value="Coeur d'Alene Homes"/&gt; &lt;p&gt;&lt;input type="text" id="Facility_Type" name="Facility_Type" value="Assisted Living Facility"/&gt; &lt;p&gt;&lt;input type="text" id="Facility_Address" name="Facility_Address" value="624 W Harrison"/&gt; &lt;p&gt;&lt;button type="button" id="send"&gt;Send&lt;/button&gt; &lt;/form&gt; &lt;script src="http://code.jquery.com/jquery-1.7.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(function(){ $('#send').click(function(){ $.ajax({ type: "POST", url: "serialize1.php", data: $('#form1').serialize(), success: function(sData) { $('#post').html(sData); } }); }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>serialize1.php</strong></p> <pre><code>&lt;?php echo '&lt;pre&gt;'; var_dump($_POST); echo '&lt;/pre&gt;'; ?&gt; </code></pre> <p>And in serialize1.php in chrome, firefox and IE I get:</p> <pre><code>array(3) { ["Facility_Name"]=&gt; string(19) "Coeur d'Alene Homes" ["Facility_Type"]=&gt; string(24) "Assisted Living Facility" ["Facility_Address"]=&gt; string(14) "624 W Harrison" } </code></pre> <p>In order to help you I would appreciate give to me more information.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload