1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to attach image to a post the way wordpress blog and this forum do

Discussion in 'PHP' started by ketting00, Jul 27, 2015.

  1. #1
    Hi guys,

    Any one has a clue on how I can upload image and attach it to a post like most of WordPress blogs and this forum do.

    Searching for answer on Google mostly return tutorials of image upload. I already do know that. And I hate it that searching for several hours long and Google bot think I'm one of them.

    Here's the example what I want:

    tits_tag.png

    There it is. You inserted it and continue posting..., writing...
    That's what I want.

    Thank you,
     
    Last edited: Jul 27, 2015
    ketting00, Jul 27, 2015 IP
  2. ketting00

    ketting00 Well-Known Member

    Messages:
    772
    Likes Received:
    27
    Best Answers:
    3
    Trophy Points:
    128
    #2
    In case you may need to know. My database is MySQL.
     
    ketting00, Jul 27, 2015 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    Well, if you know how to upload images, what is it that you really need? A way for adding (uploading) images while you're writing in a textarea-box? If that's the case, you need to say so, and you'll need to add a way for it to work (which will involve javascript). If you're happy just uploading the images and linking to them from the textbox, there are several ways that can be done - you could have a simple file-uploader which shows you (or outputs the code directly, so you can just copy and paste it) the name of the images, and you could even make a shorttag / BB-code tag for adding them to posts.
    Or you could implement a ready-made editor.
    Since you're not really clear in what you're asking, it's a bit hard to tell you exactly what you need to do to make this work.
     
    PoPSiCLe, Jul 27, 2015 IP
  4. ketting00

    ketting00 Well-Known Member

    Messages:
    772
    Likes Received:
    27
    Best Answers:
    3
    Trophy Points:
    128
    #4
    Hi @PoPSiCLe,

    Thanks for the clue. What I was asking is adding the image I just upload into the textarea-box while composing a post like the one I gave an example above.

    I'm doing a form that would insert a post into database.

    I'm able add the image into the textarea manually in case I write a post myself. But what if I was away and the people who do it have very least knowledge about computer.
    I would have an upload button by the submit button for people to upload image.

    Now that's after the image was upload, what I'm going to do after this?

    Please give more clues.

    Thanks,
     
    ketting00, Jul 27, 2015 IP
  5. ketting00

    ketting00 Well-Known Member

    Messages:
    772
    Likes Received:
    27
    Best Answers:
    3
    Trophy Points:
    128
    #5
    ketting00, Jul 27, 2015 IP