Form is functional but no data on admin page and data.dat file..
Using flat file format . Process.php and global.php set to 644. Other are are 777. Using Lunarpages servers and Apache.
Thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First check to see if the file exists. If it does not, create one. Add the first line of field names from your form separated by "|" (verticle bar). Make sure the file is writable (664).
The admin does nothing more than read this file to display it so if its not there, nothing will be displayed. Start with this and let me know what you find.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you
created new data,dat, set to 664, with field names form. FOrm still works but admin now shows the field names but no data from forms. I double checked the field names fo spelling. should i use space between words, first name or underscore first_name in the data.dat file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
File permission issues are easier to work once you know data is processed properly from the form. I use the tool to create forms then move the forms to another directory and add some security so others can not see or modify sensitive data.
Default file permissions on my server before I move anything:
forms directory: every file 644
forms/use/test2: every file 770
forms/use/test2/admin: every file 770
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One of the php scripts is generating a generic error that is supposed to report errors to the server. most servers won't handle this and instead generate a generic reply for erros not handled.
Most likely this is due to an error in the data file as long as you have not modified any scripts.
The submit action is to just process for errors, append data to the data file, and then display a thankyou message.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I will recheck the data file. Just to check
I can use the form field names to prepare the data.dat structure
so in the form it stats Do you want a coke as first field, second field do you want a dollar
in the data.datfile
Doyouwantacoke|doyouwantadollar|add third field
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Permissions; Our servers at Lunarpages use suPHP for security. The
permissions on some of the folders which contain .php files or the php
files
themselves if set to 777 or 666, will need to be changed to either 755
or 644
in Cpanel's File Manager (or using your local FTP client
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Its best to stick with the tool to generate forms and data files. I've only modified data files when debugging errors and other issues. Once these issues are worked out you should never have to manually edit anything again.
To answer your question, yes you must use the same form field names. In addition, because these are used as variable names in php scripts be sure to use short names without any illegal characters (spaces, etc). You can customize the form1.html file to display meaningful prompts later without affecting the form variables.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For security I first move the formname directory tree (begins after the forms/use/ level). I then set permissions on the formname directory files so no one has write access. I include an index.html file so its not easy for someone to browse the directory list. I then add a .htpassword file to the admin directory so you need a password to use the admin or view any files in this directory. I delete the files directory as it is never used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Form is functional but no data on admin page and data.dat file..
Using flat file format . Process.php and global.php set to 644. Other are are 777. Using Lunarpages servers and Apache.
Thank you
First check to see if the file exists. If it does not, create one. Add the first line of field names from your form separated by "|" (verticle bar). Make sure the file is writable (664).
The admin does nothing more than read this file to display it so if its not there, nothing will be displayed. Start with this and let me know what you find.
thank you
created new data,dat, set to 664, with field names form. FOrm still works but admin now shows the field names but no data from forms. I double checked the field names fo spelling. should i use space between words, first name or underscore first_name in the data.dat file?
What should the file permissions for all of the php files?
Sample data.dat file:
FirstName|LastName|Email
TNT|EVERET1|noreply@sourceforge.net
File permission issues are easier to work once you know data is processed properly from the form. I use the tool to create forms then move the forms to another directory and add some security so others can not see or modify sensitive data.
Default file permissions on my server before I move anything:
forms directory: every file 644
forms/use/test2: every file 770
forms/use/test2/admin: every file 770
Not working using 644 and 770
File permissions:
Make them all 777 until you get it working. Do it one directory at a time.
Data File:
Does the data file exist, is it the right format, if you add a form entry manually can you see it with the admin?
thank you
I will change the permissions. I made a new data file with theformat wiht no spaces
FirstName|LastName|Address|
Vertical bar at the end implies a field with no name. Look at my example. Thats the lowercase letter L at the end not a vertical bar.
Does the last field need a vertical bar.
Form shows up but
You don't have permission to access /phpform/use/select/process.php on this server
For all of this assistance.
I will make a dination
I am using vertical bar using the shift + \ key
Thats correct but you only need them between fields, not at the begining or end of lines.
ok, thank changed data file with no vert bar at beginning and end.
changed file settings to 777 and form shows up but error after pressing submit button
What error on submit? Can't be permissions because they are all 777, right?
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
One of the php scripts is generating a generic error that is supposed to report errors to the server. most servers won't handle this and instead generate a generic reply for erros not handled.
Most likely this is due to an error in the data file as long as you have not modified any scripts.
The submit action is to just process for errors, append data to the data file, and then display a thankyou message.
OK, I will recheck the data file. Just to check
I can use the form field names to prepare the data.dat structure
so in the form it stats Do you want a coke as first field, second field do you want a dollar
in the data.datfile
Doyouwantacoke|doyouwantadollar|add third field
what is the cost if you setup it with some security, mod the thank you file,..
what version of phpformgenerator should I be using?
Permissions; Our servers at Lunarpages use suPHP for security. The
permissions on some of the folders which contain .php files or the php
files
themselves if set to 777 or 666, will need to be changed to either 755
or 644
in Cpanel's File Manager (or using your local FTP client
Its best to stick with the tool to generate forms and data files. I've only modified data files when debugging errors and other issues. Once these issues are worked out you should never have to manually edit anything again.
To answer your question, yes you must use the same form field names. In addition, because these are used as variable names in php scripts be sure to use short names without any illegal characters (spaces, etc). You can customize the form1.html file to display meaningful prompts later without affecting the form variables.
For security I first move the formname directory tree (begins after the forms/use/ level). I then set permissions on the formname directory files so no one has write access. I include an index.html file so its not easy for someone to browse the directory list. I then add a .htpassword file to the admin directory so you need a password to use the admin or view any files in this directory. I delete the files directory as it is never used.
Example form1.html modification:
display this in your browser
Variables are FirstName, LastName, Email. See how whats displayed is different.
<form enctype='multipart/form-data' action='process.php' method='post'>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#000066" width="95%" cellpadding="5">
<tr>
<td colspan="3" bgcolor="#B5CBEF" height="17" width="100%" bordercolor="#FFFFFF" background="tile_back.gif">
<p align="left\><b><font face="Verdana" size="2" color="#FFFFFF"><img border="0" src="nav_m.gif" width="8" height="8">
<font face='Verdana' size=2 color='#FFFFFF'><b>
<!- You can add a form title here -->
</font><font face="Verdana" size="2" color="#000066"> </font></b></td>
</tr><tr><td colspan="3" bgcolor="#B5CBEF" height="16" width="100%" bordercolor="#FFFFFF" background="tile_sub.gif"><font size="2" face="Verdana"><b><font face="Verdana" size="2" color="#000066">
<!- You can add a brief form description here-->
</font></b></font></td></tr><tr><td colspan="3" bgcolor="#D6DFEF" height="16" width="100%" bordercolor="#FFFFFF"><font size="1" face="Verdana">Please fill in all fields marked with a *</font></td></tr><tr><td height="30" width="55" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<img border="0" src="bc_new.gif" width="28" height="28"></td><td height="30" width="189" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana" size="2">Enter Your First Name</td>
<td height="30" width="469" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana"><input type=text name='FirstName' size=20></td></tr><tr><td height="30" width="55" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<img border="0" src="bc_new.gif" width="28" height="28"></td><td height="30" width="189" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana" size="2">Enter Your Last Name</td>
<td height="30" width="469" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana"><input type=text name='LastName' size=20></td></tr><tr><td height="30" width="55" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<img border="0" src="bc_new.gif" width="28" height="28"></td><td height="30" width="189" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana" size="2">Enter Your Email Address</td>
<td height="30" width="469" bgcolor="#EFF3F7" bordercolor="#FFFFFF">
<font face="Verdana"><input type=text name='Email' size=20></td></tr><tr><td colspan="3" bgcolor="#B5CBEF" height="25" width="737" background="tile_sub.gif"><p align="center"><font face="Verdana" size="2"><input type=submit value='Submit Form'> <input type=reset value='Reset Form'></font></td></tr>
</table></form> <br><br><a href='http://phpformgen.sourceforge.net'><img src='button.jpg' border=0></a>
Don't think version matters but I am using phpformgenerator v2.09
delete old stuff
clean install
form appears
have data.dat and structure is ok
can not access admin page
started with 777 then went 644
no luck