Jump to content

Recommended Posts

Hello,

 

I am currently trying to learn php from a book called PHP for Absolute Beginners where it teaches you how to build a blog by "hand". All nice and good until i got to the submit an entry and save it to my database process.

I'm using PDO with INSERT prepared statement like so, from a separate update.inc.php file:

 

$sql = "INSERT INTO entries (title, entry) VALUES (?,?)";
$stmt = $db->prepare($sql);
$stmt -> execute(array($title, $entry));
$stmt ->closeCursor();

 

I have attached screenshots of my database in mysql. What could be the problem? Remeber I am an "ABSOLUTE BEGINNER" :P .

Thank you

 

[attachment deleted by admin]

I'm sure you provided your friend with a lot more information about the code and variables that was causing the problem than what you supplied here.

 

When the post that starts a thread doesn't contain all the relevant code and information needed to solve them, a lot of threads just go unanswered and fall off the front page of the forum.

 

Don't complain if someone didn't feel like taking the time to ask you to post relevant code and information about the problem that you didn't take the time to include in the first post in the thread.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.