PHP_Idiot Posted August 11, 2009 Share Posted August 11, 2009 Hi All I have the following query but I'm struggling to get the quotes in the right order or to escape the right one to make it work! Any help would be greatly appreciated. mysql_query("INSERT INTO Player (MembershipNo, FirstName, NickName, LastName, Town, Email) VALUES(\"$_POST[MembershipNo]\", \"$_POST[FirstName]\", \"$_POST[NickName]\", \"$_POST[LastName]\"', \"$_POST[Town]\", \"$_POST[Email]\") ") Link to comment https://forums.phpfreaks.com/topic/169755-can-you-help-me-escape-these-quotes/ Share on other sites More sharing options...
PHP_Idiot Posted August 11, 2009 Author Share Posted August 11, 2009 Don't worry folks I found a ifferent way of doing it: $result = "INSERT into Player values (\"$_POST[MembershipNo]\", \"$_POST[FirstName]\", \"$_POST[NickName]\", \"$_POST[LastName]\", \"$_POST[Town]\", \"$_POST[Email]\")"; Link to comment https://forums.phpfreaks.com/topic/169755-can-you-help-me-escape-these-quotes/#findComment-895564 Share on other sites More sharing options...
robert_gsfame Posted August 11, 2009 Share Posted August 11, 2009 use quotation mark ( ' ) instead of ( " ) Link to comment https://forums.phpfreaks.com/topic/169755-can-you-help-me-escape-these-quotes/#findComment-895581 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.