Menu

Form generated but no data in admin or data.d

Help
nipper
2005-07-22
2013-06-03
1 2 > >> (Page 1 of 2)
  • nipper

    nipper - 2005-07-22

    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

     
    • TNTEverett

      TNTEverett - 2005-07-22

      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. 

       
    • nipper

      nipper - 2005-07-22

      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?

       
    • nipper

      nipper - 2005-07-22

      What should the file permissions for all of the php files?

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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

       
    • nipper

      nipper - 2005-07-22

      Not working using 644 and 770

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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?

       
    • nipper

      nipper - 2005-07-22

      thank you

      I will change the permissions. I made a new data file with theformat wiht no spaces
      FirstName|LastName|Address|

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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. 

       
    • nipper

      nipper - 2005-07-22

      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

       
    • nipper

      nipper - 2005-07-22

      I am using vertical bar using the shift + \ key

       
    • TNTEverett

      TNTEverett - 2005-07-22

      Thats correct but you only need them between fields, not at the begining or end of lines.

       
    • nipper

      nipper - 2005-07-22

      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

       
    • TNTEverett

      TNTEverett - 2005-07-22

      What error on submit?  Can't be permissions because they are all 777, right? 

       
    • nipper

      nipper - 2005-07-22

      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.

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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.

       
    • nipper

      nipper - 2005-07-22

      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

       
    • nipper

      nipper - 2005-07-22

      what is the cost if you setup it with some security, mod the thank you file,..

       
    • nipper

      nipper - 2005-07-22

      what version of phpformgenerator should I be using?

       
    • nipper

      nipper - 2005-07-22

      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

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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. 

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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. 

       
    • TNTEverett

      TNTEverett - 2005-07-22

      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\&gt;<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 -->
      &nbsp;
      </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-->
      &nbsp;
      </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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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>

       
    • TNTEverett

      TNTEverett - 2005-07-22

      Don't think version matters but I am using phpformgenerator v2.09

       
    • nipper

      nipper - 2005-07-22

      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

       
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.