Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    requesting a form processor

    I was helped in the CGI forum by Spookster, and he had said that he had done a script very similar to the one i was requesting and gave a link to it [here]

    only thing is i dont know howto set it up to print out into a template sort of deal. and i do need an upload feature that would work like:
    user gives path to file to upload to site, and then php script uses that url as his "image" on his biography... perferrably only allowing jpg and gif of a certain size. or relitive size.

    ------------------------
    but maybe i can show you wut im trying to do, to give you a better understanding. and maybe go from there?

    http://www.dancecity.net/cs/mage111/bio2.html

    thats wut the output should look like.

    form will be asking:
    full name
    alias (which will be put in those brackets)
    age
    location
    Email, icq, AIM, YIM, MSN... and if they are not filled in then they are left with a #

    and then
    Favorite wep (kinda wanna make a drop down menu)
    Favorite map
    Quote
    -----------------
    the one big problem is: i cant use MySQL, so thats why it has to be outputted to a HTML file :/

    but i thankyou for reading this, and thankyou for any help anyone has to offer :-)

    Peace

  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    small bump

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    How are all the files going to be structured? Are all the bio pages going to be in the same directory as well as the photos? Or is each person going to have their own directory with their bio and photo?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    each photo and bio page will be in the same directory as the photo's

    edit: URL now works. srry didnt kno it was broke
    Last edited by AnOdeToNoOne; 08-03-2002 at 11:22 PM.

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Ok since you are planning on having everything in the same directory this gets a bit more tricky. This is because of file names. Since you are creating static html pages then you have to devise a naming scheme so that no conflicts in names arise. If there are going to be many bio pages using the persons name is not wise as there could be more than one person with the same name. The same thing applies to the photos. Obviously the image file name will have to be changed after they upload it so a naming scheme for those will have to be devised so as to prevent conflicts in file names.

    Will these people have to register to use the site and be assigned a user id or username or something?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok forgive me im quite drunk while im writing this: yuo said its going to be kinda tricky because of the naming of files.

    when the PHP program does its thing, could it extract the username from the form, and rename the output HTML and the .jpg/.gif to that name?

    would that be possible or is there an easier way...

    sorry kinda drunk n ideas are on low
    LALA

  • #7
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Yes if the username is in the same form as the one being used for filling in the info for the bio page and uploading the image. The username can be used for the file names.

    Will the usernames be unique?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #8
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yeh the form will be asking like

    First name
    Username/alias
    Last name

    and be displayed

    John (n00bie) Doe

    so in short, yes it will be unique depending on the persons alias used in the clan

  • #9
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Is there something else in place already that ensures that two people will not use the same username?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #10
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmmm besides the fact that noone in the clan has same user name that they would fill form out with... only thing i can suggest is that if someone uses the same name more then once...

    it creates the HTML page and jpg/gif image like

    username.html - username.jpg
    username(1).html - username1.jpg
    username(2).html - username2.jpg

  • #11
    New Coder
    Join Date
    Aug 2002
    Location
    Henderson, NV
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did something similar to this a while back and a quick option that might help would be to create a file that simply has the list of user names already created. When a user goes to create their profile, you can open the file, do a simple find and see if the name already exists, and if it does, report an error message telling them to choose another user name. Similarly, if the username doesn't exist, you can then write that user name into the file and continue with the process. Hope this helps...
    Peace out homeskillets!!!

  • #12
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if its not too much trouble, that may be a good addition to it...

    but if spookster is going to work on it, its his call... im only greatful of the help so far :-)

  • #13
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    That's a very good suggestion. The only other option would be to scan the filenames in the directory which could take a bit longer. How many people do you anticipate having bio pages?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #14
    New Coder
    Join Date
    Jul 2002
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    initially there will be approximately 50-60, this clans one if not thee largest clan in canada, and we can members at a high rate imho.

    so, its more or less an ongoing list.

  • #15
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Since you don't utilize a database for this then I guess you have no choice but to just use a text file to store the data. If it starts getting really large then it could slow things down a bit.

    So to summarize...

    User goes to form (btw you should post the code for your form) and fills out the form.

    When form is submitted it will open up the username file and check to see if username already exists. If it does, print a message saying sorry try another name. If it doesn't then adds their name and generates the html page with the info they submitted along with the photo.

    Question: Is the photo going to be a requirement? If not a default image can be placed in the page instead stating no photo available.

    As for the html and image file names, once the image is uploaded the file name will be changed to the username of the person and the html page will be named as the username.

    Question: Do you wish that they be redirected to their newly created bio page?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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