HTML form upload assistance

TeKniquesTeKniques Member Posts: 1,262 ■■■■□□□□□□
Hello everyone. I have a little problem this morning here at work that I am hoping someone might be able to assist me with.

I am writing several web pages for the company I work for, the pages include an online employment application that will upload to a text file as well as upload their resume. I write the pages in HTML, PHP, and JavaScript.

Well, I get the text file and the resume uploaded no problem to the server, but the only thing that isn't working: The data fields in the application will not save anything past the first string inputted.

For example:
Address: 123 Your Street
It saves only 123 and not the rest to the text file. Anyone have some idea as to why this won't work?

I'm not even sure what to search under Google for. Perhaps any webmasters around here could offer their advice, I've been building websites for about 6 months now, and these are the first forms I have been writing icon_redface.gif

Thanks.

Comments

  • TeKniquesTeKniques Member Posts: 1,262 ■■■■□□□□□□
    Hey I figured it out.

    It was an error in one of my PHP scripts. I was almost pulling out my hair icon_mad.gif, but what was going on was when the data was passed from one page to the next I didn't quote the values in the script.

    For example as it is exactly written:

    <?php
    foreach ($_POST as $key=>$val) {
    print "<input type=hidden name=$key value='$val'>";
    }
    ?>

    I did not have the $val in quotes before, but after the change the data all gets inputted to the text file correctly. In case anyone else has a similar problem, that was the fix. :D
Sign In or Register to comment.