prezident Posted January 1, 2011 Share Posted January 1, 2011 $sql = "INSERT INTO entries(title, entry) VALUES (?, ?)"; $stmt = $db->prepare($sql); $stmt-> execute(array($title, $entry)); $stmt->closeCursor(); I'm confused but i think i gotta just stop the self doubt -> i'm confused about what these code does ok i know the insert statement $stmt = $db->prepare($sql) = i'm guessing this prepares the $sql variable and prepares it for execution and stores the (?, ?) as an array with ($title, $entry) keys. am i right ? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted January 1, 2011 Share Posted January 1, 2011 http://www.google.com/search?client=safari&rls=en&q=php+prepared+statements&ie=UTF-8&oe=UTF-8 Quote Link to comment 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.