Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Move/delete Image On Webpage Automatically?


2 replies to this topic

#1 kvarnerexpress

    Super Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 407 posts

Posted 19 December 2004 - 11:00 PM

Hi,
Im creating a website that sells carpets and basically ive created webpages with the picture and checkboxes underneath the pictures so users can select which carpet they want!
Once they submit the form, we get the order including form details!
The problem is that once the user checks the checkboxes, i want to be able to delete that image from that webpage or move that picture to another location in the folders i have stored on the server. The reason is becuase evry carpet is unique so that two people cant order the same carpet!
Now wat is the best way 2 do this.....
Using a database or can this be done using sumat like javascript or sumat?
Thanks in advanced!

#2 no9t9

    Privileged Member

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 773 posts

Posted 20 December 2004 - 12:29 AM

kvarnerexpress, on Dec 19 2004, 07:00 PM, said:

Hi,
Im creating a website that sells carpets and basically ive created webpages with the picture and checkboxes underneath the pictures so users can select which carpet they want!
Once they submit the form, we get the order including form details!
The problem is that once the user checks the checkboxes, i want to be able to delete that image from that webpage or move that picture to another location in the folders i have stored on the server. The reason is becuase evry carpet is unique so that two people cant order the same carpet!
Now wat is the best way 2 do this.....
Using a database or can this be done using sumat like javascript or sumat?
Thanks in advanced!

<{POST_SNAPBACK}>


i think the easiest way is to use php. I am not sure how many carpets there are and how the you display them, but with php you can write a script to display whatever is in the "carpets" directory and then add exclusions.

So, when someone submits a form to buy a particular carpet, the php script for the form can also change the file extension to "sold" (or whatever). When the carpet display php script goes to display all the carpets, tell it to skip all "sold" extensions... if !(strstr($filename,'.sold')) { display some html stuff here }

i'm not sure how much php you know, but i can help you. I wrote a similar script to display images so that whatever images I put in that directory would get displayed. No need to update html code... just upload the file into the directory.

#3 m33

    Member [Level 1]

  • Kontributors
  • PipPipPipPip
  • 60 posts

Posted 22 December 2004 - 06:16 PM

you can also just redirect it to the same page without the pics on it, that's easyer (dunno how good you are at PHP and all that)




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users