Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: One form to another using PHP

  1. #1
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default One form to another using PHP

    I have a form with about 100 fields, okay a big form, which the user fills in. I then have it run through a .php script that sends the data fields back to me.
    I now want if possible to set up a another form identical that is sent with the data that was supplied by the user back to my email address which I can print off.
    At present i have to manually take the data from the email and sit and fill in the same form by hand with the data that i have sent to my email.
    I am looking for a simple .php script that can do this.
    I can code xhtml and forms and validate so alright on this end.
    A simple tutorial that shows how to do a single form field, then extract the data and dynamically build another page that has the data displayed like the original will get me started and I can build from this. I hope to NOT have to use MySQL to do this at this stage.
    I am really struggling to find any scipts or tutorials to show me this.
    does this make sense. suggestions of anything at present.
    I will also warn you the very basics of .php is what I know, but starting to learn.
    Another method i can think of is leaving the data in a database and sending an email back to me to say the data has been supplied which in turn would call the data and input it into the form when I click a link in the email.

  2. #2
    Join Date
    Nov 2008
    Posts
    19
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    are you not able to print the emailed form you originally receive? you could use a form processor that organizes your emailed form.

  3. The Following User Says Thank You to owt200x For This Useful Post:

    stealthmode666 (12-04-2008)

  4. #3
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the reply,
    The form I made is on-line which is accessed by a member on the website.
    They fill in the details and on submit I have a .php script that takes the data from the filled in fields and sends it to my email. The form has about 100 fields which is a lot. I was wondering if I could somehow duplicate the form by .php which would run a script that reproduces the form and sends that form to me.
    Or is there a way the original form on the website I made with all the data fields filled in can be sent somehow as is to my email instead of me using .php to extract the data from the fields and send this back to me?
    The email I get is just simple text with all the fields I have in an array. As you can imagine it looks messy.

    The member has the option to fill it in on-line and I made a seperate .pdf of the same form so they can print and send in the post or Fax back to me.

  5. #4
    Join Date
    Jul 2007
    Location
    Irmo, SC
    Posts
    96
    Thanks
    10
    Thanked 7 Times in 7 Posts

    Default

    personally with that amount of data, i would stick the data in a mysql table.... then just create a view page that pulls up the data

  6. The Following User Says Thank You to gpigate For This Useful Post:

    stealthmode666 (12-04-2008)

  7. #5
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    I knew this was going to be said. Problem is I don't know MySQL but no time like the present to learn. I have installed MySQL with PHP and apache but this on it's own is mind boggling and the documentation is not very clear with too many this or that combinations of what, and how, and not what to do before you get started with it. So still trying to work out the configuration of all this before I even get to the stage of knowing how and where to put all the files. As you can see the learning curve is very steep and with no actual help from a living human being and only online help which takes forever I am struggling.
    Thanks anyway.
    I have another question but i'll do a seperate post as seperate issue

  8. #6
    Join Date
    Jul 2007
    Location
    Irmo, SC
    Posts
    96
    Thanks
    10
    Thanked 7 Times in 7 Posts

    Default

    Does the webserver you are using not have it installed? I personally prefer to work on the server because the configurations and versions can be different than what you install. For instance you can go download the latest mysql etc write some cool functionality only to have it not be supported by the version on the server. If you own the server not a big deal.

    As for coding mysql and php, that part is relatively easy. Do not let the appearance concern you. An insert statement is pretty small codewise, the select is as well.

    In the end it is going to save you a lot of time and effort maintaining that amount of data without a database. That is what they were created for.

    If you need any help getting your pages going with mysql/php let me know. I can send you some examples, tips etc.

  9. The Following User Says Thank You to gpigate For This Useful Post:

    stealthmode666 (12-05-2008)

  10. #7
    Join Date
    Nov 2008
    Posts
    19
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    im not good in mysql either, otherwise i would be making better stuff. But I have a contact form on my website at http://www.owt200x.us/contactform and the emailed form doesnt look messy when it is sent, each field is on a new line. I would be willing to integrate my form code into your form, ( for a small donation of course to my homeless shelter).

    Im still working on using fpdf with my form so the form will input it in a pdf that is sent by email to the form owner, but it is still a long way off. Main reason is I build online job application forms, and I needed a way for the business owner to print the application out after submission.

    Barry "OwT"

  11. The Following User Says Thank You to owt200x For This Useful Post:

    stealthmode666 (12-05-2008)

  12. #8
    Join Date
    Jul 2007
    Location
    Irmo, SC
    Posts
    96
    Thanks
    10
    Thanked 7 Times in 7 Posts

    Default

    if you want another contact form... i can send you mine as well.

    http://outdoorsindoors.net/DEMO/inde...ontact/contact

    uses recaptcha for anti spam. nothing special and no database interaction other than pulling the keys for the recaptcha. they are stored in the database in a preferences table.

  13. The Following User Says Thank You to gpigate For This Useful Post:

    stealthmode666 (12-05-2008)

  14. #9
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Default

    Thanks GPIGATE. I haveMySQL on the server I use. I have installed mysql and know how to create tables and use query commands (some anyway).
    Any tutorials are needed this end.
    I have paid for and downloaded Lynda.com PHP with MySQL Essential Training including exercise files and a video called Lynda.com-PHP Essential Video Training which I'm working through as fast as I can.
    The script in .php I use is what I pieced together from what little experience I have at present which almost works. I need a piece of script that would allow the check of blank fields to be ignored or somehow a way for them to be filled in even with a blank space.
    Any blank fields gives the user a page of [notices:undefined index in....] instead of showing them the thank-you page. Not nice.
    I have .js file on the server which checks as they type in the fields that information is correct so I don't need my script to do anything apart from send the data and show the thank-you page.
    I guess I tried running before I could walk.
    An email with a list on order of over 100 fields is not nice and I am trying to understand now how to take the data and insert it into the same page with the fields that will be sent to me.
    I have to manually take the form in front of me(Printed version) and fill in the form from the email details.
    I also use the live server to check how everything works to the browser and user.
    All this files are on the server in a protected folder away from prying hacks so not to bothered about security on the scipts been hacked at the moment.

    send me as much help as you can, i don't sleep this end, morning day and night i'm on this till i undertand what i'm doing

  15. #10
    Join Date
    Jul 2007
    Location
    Irmo, SC
    Posts
    96
    Thanks
    10
    Thanked 7 Times in 7 Posts

    Default

    something just came to mind. does the fields you are using change a lot? ie do you need more fields, less fields, different fields?

    to me... i would create an administration page where you can dynamically create text boxes, drop downs, and radio buttons. store those in a table.

    then on the submission form, just pull the fields from the table, sticking the values in a separate table.

    this may present challenges with your js field validation but that again could be retooled to work.

    i have an app that i have written that does pretty much the same thing for product attributes. it does not force required fields though.

    shoot me an email or a PM and I can send you some code / table layouts.

  16. The Following User Says Thank You to gpigate For This Useful Post:

    stealthmode666 (12-07-2008)

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
  •