your program is great, especially the sql functions.
1)
However, the file upload doesn't work with my php version. The file doesn't appear in the path specified, it doesn't even seem that the files got uploaded at all.
I have replaced the copy( function in process.php (something around line 41) with
Well, the Message 'T_VARIABLE' or '$' expected in line 4 is because I gave the variable a number, now it works. However, the file doesn't appear on my server, although I have created a directory 'files' in phpform/forms on my own...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear musawir,
your program is great, especially the sql functions.
1)
However, the file upload doesn't work with my php version. The file doesn't appear in the path specified, it doesn't even seem that the files got uploaded at all.
I have replaced the copy( function in process.php (something around line 41) with
---
if (is_uploaded_file($_FILES['Bildupload']['tmp_name'])) {
copy($_FILES['Bildupload']['tmp_name'], "files/".$image_part);
} else {
echo "Possible file upload attack. Filename: " . $_FILES['Bildupload']['tmp_name']." image_part: ".$image_part;
}
but all I get is the boolean echoed that the specified tmp_file didn't get uploaded.
My form1.html starts with
<form enctype='multipart/form-data' action='process.php' method='post'>
and ends the following way:
<input type='hidden' name='MAX_FILE_SIZE' value='1'> <input type='file' name='Bildupload'></td></tr><tr><td>Signatur</td><td><textarea name='Signatur' rows=7 cols=80></textarea></td></tr><tr><td>Newsletter bestellen</td><td><input type=radio name='Newsletterbestellen' value='ja, bitte.'>ja, bitte.<br><input type=radio name='Newsletterbestellen' value='nein, bitte nicht.'>nein, bitte nicht.<br></td></tr></table><input type=submit value='Submit Form'> <input type=reset value='Reset Form'></form> <br><br><a href='http://phpformgen.sourceforge.net'><img src='button.jpg' border=0></a>
2.)
When I try to create a form on your demo site and I add check boxes, radio buttons and a file upload field I get the error
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/groups/p/ph/phpformgen/htdocs/phpform/forms/process.php on line 4
When calling up a form with only one file-entry I get the following:
"The following errors occured while processing your form input.
* The file, ***************, was not uploaded!
I use Netscape as well as Internet explorer.
Best regards,
Oliver
Well, the Message 'T_VARIABLE' or '$' expected in line 4 is because I gave the variable a number, now it works. However, the file doesn't appear on my server, although I have created a directory 'files' in phpform/forms on my own...