2
Contributors
3
Replies
25
Views
3 Years
Discussion Span
Last Post by diafol
0

The sql is basically the same whatever flavour of mysql functions/connection method that you use.

So what do you want? file insert as blob or filename and upload to folder? Please don't say both. Have you researched this as there are hundreds of tutorials out there on this?

Specifically, which part of this are you having trouble with? Show your code so far.

0

This is my code:

if(!isset($error)){

            try {

                $postSlug = slug($postTitle);


                //insert into database
                $stmt = $db->prepare('INSERT INTO blog_posts_seo (postTitle,postSlug,images,postDesc,postCont,postDate) VALUES (:postTitle, :postSlug, :images, :postDesc, :postCont, :postDate)') ;
                $stmt->execute(array(
                    ':postTitle' => $postTitle,
                    ':postSlug' => $postSlug,
                    ':images' => $images,
                    ':postDesc' => $postDesc,
                    ':postCont' => $postCont,
                    ':postDate' => date('Y-m-d H:i:s')
                ));
                $postID = $db->lastInsertId();

How to work?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.