Jump to content

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
https://forums.phpfreaks.com/topic/153046-upload-content-to-database/
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.

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.

 

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.

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.

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.

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

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.