shortysbest Posted November 15, 2010 Share Posted November 15, 2010 When i $_POST[] the form it doesn't send anything to database after the & sign. How can i allow it to send without breaking the php code or whatever. right now I have : mysql_real_escape_string(ucwords($_POST['title'])); Thanks. Link to comment https://forums.phpfreaks.com/topic/218741-how-can-i-send-or-amp-to-database/ Share on other sites More sharing options...
Pikachu2000 Posted November 15, 2010 Share Posted November 15, 2010 Have you verified that it's making it as far as the query string intact? Make sure it's in the $_POST array, and echo the query string to make sure it's there also. echo '<pre>'; print_r($_POST); echo '</pre>'; Link to comment https://forums.phpfreaks.com/topic/218741-how-can-i-send-or-amp-to-database/#findComment-1134493 Share on other sites More sharing options...
shortysbest Posted November 15, 2010 Author Share Posted November 15, 2010 I'm using ajax to send the form, and when i alert it out in the javascript it has it there as &. But it doesn't work once it's gone to the php script Link to comment https://forums.phpfreaks.com/topic/218741-how-can-i-send-or-amp-to-database/#findComment-1134505 Share on other sites More sharing options...
AbraCadaver Posted November 15, 2010 Share Posted November 15, 2010 Javascript encodeURI() or encodeURIComponent() depending on the data. Link to comment https://forums.phpfreaks.com/topic/218741-how-can-i-send-or-amp-to-database/#findComment-1134523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.