SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamically upload Background image

    I am creating a website and there is an option for the user (after he login to the website, he enters into his workspace page)to upload a background image of his choice to his workspace page.

    Can the user dynamically upload a background image to his webpage?

    Can this be done in javascript/php?
    I would be glad if somebody could help me.

  2. #2
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can upload the image via a <form> and <input type="image".......... and if the upload is successful, redirect back to the original page with the uploaded file name attached in the url's query string.

    At the top of the web page, check if a query string exists. If it does, then assign the attached file name as the bg image in the css using php.


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
  •