oceans Posted July 2, 2007 Author Share Posted July 2, 2007 Mmarif4U, where should this " mysql_real_escape_string " be placed is it just before writing to db, please guide. addslashes seems opposite to stripslashes this will help me to remove (/) it is? I am still willing to mod my code and put this mysql real escape Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287731 Share on other sites More sharing options...
mmarif4u Posted July 2, 2007 Share Posted July 2, 2007 Yes use mysql_real_escape_string before entring something to db. Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287734 Share on other sites More sharing options...
oceans Posted July 2, 2007 Author Share Posted July 2, 2007 Ok lets say I have 2 variables, (mysql_query("UPDATE `member` SET `Name` = '".mysql_real_escape_string($InputFromScreen[1])."',`Address` = '".mysql_real_escape_string($InputFromScreen[2])."' WHERE `EmailAddress` = '".$FromEarlierScreen[3]."'") Am I right? Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287748 Share on other sites More sharing options...
mmarif4u Posted July 2, 2007 Share Posted July 2, 2007 Yes its almost right but if u filter it before putting it in query that will be work well. Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287752 Share on other sites More sharing options...
oceans Posted July 2, 2007 Author Share Posted July 2, 2007 Mmarif4U, I hope I am not asking too much can you give my code a twitch? Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287756 Share on other sites More sharing options...
mmarif4u Posted July 2, 2007 Share Posted July 2, 2007 No its ok, Then post some code but remember i had already told u that dont use it array or loop. Use addslashes or stripslashes will work fine here. Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287759 Share on other sites More sharing options...
oceans Posted July 2, 2007 Author Share Posted July 2, 2007 Oh Mine, I update a maximum of 30 entries at one time all in array form, ok I give up, but as long as the slashes help me I am happy, to my list (')(`)(")(\) do you think I should add anything more. I am very happy with your warm help friend Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287762 Share on other sites More sharing options...
mmarif4u Posted July 2, 2007 Share Posted July 2, 2007 Thanks you u welcome. No i think these are fine to use, no other stuff to put. Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287768 Share on other sites More sharing options...
oceans Posted July 2, 2007 Author Share Posted July 2, 2007 Thanks my friend, This is the second time you stayed with me while I am troubled. Thanks a million! Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287777 Share on other sites More sharing options...
mmarif4u Posted July 2, 2007 Share Posted July 2, 2007 You welcome. Always remember do validation from user input while running live server. This will make safe ur site from bad users. Link to comment https://forums.phpfreaks.com/topic/58012-filter-problem-with-different-versions/page/2/#findComment-287789 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.