Pikachu2000 Posted March 10, 2012 Share Posted March 10, 2012 There was nothing really wrong with the syntax the way you had it to begin with. The logic, on the other hand, needs some work, and string values need to be escaped. Numeric values do not need to be escaped by some catch-all function; they need to be validated and cast as the correct data type. Quote Link to comment https://forums.phpfreaks.com/topic/258654-sql-insert-not-working-any-ideas/page/2/#findComment-1325945 Share on other sites More sharing options...
kevonini Posted March 10, 2012 Author Share Posted March 10, 2012 Will certainly look into it... a quick question though - how wud i copy the database i am working with to make other people have access to it, where is it stored?(stupid i know but i'm really flustered now) Quote Link to comment https://forums.phpfreaks.com/topic/258654-sql-insert-not-working-any-ideas/page/2/#findComment-1325946 Share on other sites More sharing options...
kevonini Posted March 10, 2012 Author Share Posted March 10, 2012 I must confess...I made a REAL newbie error that wasn't PHP related at all - my form was missing the POST method so that section of code received nothing Quote Link to comment https://forums.phpfreaks.com/topic/258654-sql-insert-not-working-any-ideas/page/2/#findComment-1325951 Share on other sites More sharing options...
Pikachu2000 Posted March 10, 2012 Share Posted March 10, 2012 Being that you were looking for $_GET variables, leaving method="post" out of the form wasn't causing the problem because form methods default to get when no method is specified. Regarding your database question, I'm not really sure what you're asking . . . Quote Link to comment https://forums.phpfreaks.com/topic/258654-sql-insert-not-working-any-ideas/page/2/#findComment-1325954 Share on other sites More sharing options...
redsmurph Posted March 10, 2012 Share Posted March 10, 2012 If you suspect something like that (or even if you don't), just call the following and you'll know. Saves a lot of time. var_dump($_POST); var_dump($_GET); Quote Link to comment https://forums.phpfreaks.com/topic/258654-sql-insert-not-working-any-ideas/page/2/#findComment-1325955 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.