Jump to content

Insert Text AND Image to Databse then Display


ste9890

Recommended Posts

Before I start I'm a bit of a PHP/MYSQL newbie.

 

I have created a simple blog/news feed using PHP and MYSQL:

http://stephengreig.co.uk/newjack/blog.php

 

Currently I can insert the news post details into the database table and the news feed will update.

 

What I want to do is create a form where a user can input the post title and text as well as upload an image (which is the main bit I'm having trouble with). When submitted this form then inserts the data into the database and updates the news feed page.

 

My database table for the news post is simply: id, postdate, title, newstext.

Do I simply add another field for image with a BLOB type? Or does the image need its own table?

 

Any help would be greatly appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.