Jump to content

Upload content to database


gnawz

Recommended Posts

Hello,

 

I have a script to insert text data into a database which works well.

 

I aslo have a script that uploads images to the database very well.

 

however, I need to design a page that uploads both text and images. ie a CMS driven page where I can upload text and images mixed together.

Any help?

Link to comment
Share on other sites

Think you're in the wrong part of the forum and want to be PHP applications instead.

At least it seems to be it looks like you're looking for a CMS such as e107, wordpress, joomla etc.

Link to comment
Share on other sites

Simply use some <input type="file" /> along with textareas in the same form?

If you already got both you simply need to combine them into a single form so they get submitted at the same time.

Link to comment
Share on other sites

Sounds like this project is way over your head.

 

Start by learning SQL. The find a file upload in PHP Tutorial.

 

If you do not even know the basics of SQL for File uploading you will not get very far, and we, do not have the time to take to research and explain every little bit to you, which is what you are essentially asking.

Link to comment
Share on other sites

I know how to upload files using PHP to MySQL...

 

I know PHP programming

 

I have sections on mys site that I update via an admin panel...

 

Stuff like News, Events, Careers and so on... that is text only

however, i need to be able to add images as well to some pages. ie Add text on the left, an image on the right, text above, an image below...and store these in a database where the server picks them and displays on the browser.

 

Hope I'm clearer now.

 

Link to comment
Share on other sites

You don't actually need to store the image itself in the database (although you could, but it will just fill up the database real fast without much advantage).

Simply store the images on the server and link to them, try looking at for example fckeditor and I think you'll find what you're after.

Link to comment
Share on other sites

I already have that.

 

I would like the images to be stored in the database.

I am failing to do this.

 

i can do it if I'm dealing with ie products

such that I have a product title and then, description, then image.

 

However, I want the images to be mixed with text, as in appear any where in text as inserted-but these images should come from the db

 

Thanks alot.

Link to comment
Share on other sites

Well that's a whole lot harder as the only way I can come up with is when submitting it to the database checking all the image tags if they point to a page that can create images out of a $_GET parameter.

 

Could you tell us the reason as to why you'd want to do it like that? It's a very unusual way to do things putting a lot more stress on the server then simply linking to an image. Simply mixing images with text can be done fine using links to normal resources on the server.

 

So I'm not saying it's impossible, or that I don't want to help you. I am however reluctant to help unless you can come up with a compelling reason as to why you'd want to take this approach as I can't see any good reason as to why anyone would want to do this.

Link to comment
Share on other sites

I just wanted everything to be in the DB.

 

Well, i will have to stick to this way but the reason is the image display with content works well with localhost but doesn't work with my host and I'm not getting any help.

I even don't know why.... I uploaded all my files

Link to comment
Share on other sites

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.