Results 1 to 6 of 6

Thread: php image upload shown in text area

  1. #1
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default php image upload shown in text area

    hi

    I know already how to upload files in PHP.

    What I need to do is after uploading an image, to add it in a textareae on the same page.

    If you didn't get me, this image should help:




    Thank you!

  2. #2
    Join Date
    Jul 2006
    Posts
    497
    Thanks
    8
    Thanked 70 Times in 70 Posts

    Default

    Use an empty/absent ACTION attribute in your FORM and, on the same page,<textarea><?php echo file_get_contents($path_to_upload); ?></textarea> (in an 'if' to determine if anything has been uploaded first).

    (BTW, that image URL times out for me, and I'm on DSL.)

    EDIT: The image finally loaded, and I don't think that's possible with a traditional textarea; you'll need to use an IFRAME or scrolling DIV for that. And if the user must type into the same thing, you're wanting a WYSIWYG script; see http://www.dynamicdrive.com/dynamici...iwyg/index.htm.
    Last edited by Jesdisciple; 07-15-2008 at 08:32 PM.

  3. #3
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default

    ok, thank you

  4. #4
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    Um, haven't tried it before. What about simply to give background to textarea with that image?

  5. #5
    Join Date
    Nov 2007
    Posts
    151
    Thanks
    67
    Thanked 0 Times in 0 Posts

    Default

    It's a nice idea but I don't want it as a background

    still thanks

  6. #6
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    You can't place in image in a form feild, except as a background. You could try positioning it with CSS to make it look like it's in the textarea, I suppose.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •