Form field data not collected into either csv file nor MySQL

Issues related to forms.
Post Reply
petertj
 
 
Posts: 35
Joined: Thu Apr 12, 2012 11:18 am

Form field data not collected into either csv file nor MySQL

Post by petertj »

I am familaiar with the construction of a form within WWB but have always had problems in getting the data to be collected in either CSV or MySQL db.

In the case of the CSV issue the error given is "can't open file" after the submit button is pressed. The file is in the chosen server location and has read and write attributes.

With the MySQL issue the database has been created and tested using a third parted (server service provider) PHP script to check that the login credentials are correct. However, there is no stage in all the various instructions given with the WWB environment for the table to be created. So the script is unable to throw data at a table that doesn't exist! The error message is:

"Failed to insert data into table!
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`DATESTAMP`, `TIME`, `IP`, `BROWSER`) VALUES ('2023-03-27',' at line 1"

The link to the page with the form is www.learnus.co.uk/events/futureed23.php.

I am not conversant with either PHP or MySQL and would appreciate assistance to get this working. My MySQL service provider does not permit the use of third party editors on customer databases so its difficult for me to know how a table with the correct structure for my form data can be created.

Peter
User avatar
Pablo
 
Posts: 21710
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form field data not collected into either csv file nor MySQL

Post by Pablo »

In the case of the CSV issue the error given is "can't open file" after the submit button is pressed. The file is in the chosen server location and has read and write attributes.
If the file cannot be open then either the file does not exist in the specified location or it does not have write permission.

To be able to help you with the MySQL error, I need a DEMO project.

Tip: try to do only one thing at a time. if you have an issue with MySQL then disable all other features o you can focus on this issue only.

Also, note that I cannot see what you have done based on the published page (HTML), because the software has thousands of options and millions of possible combinations.
So, there is no way to know which options you have used by looking at the HTML only.
petertj
 
 
Posts: 35
Joined: Thu Apr 12, 2012 11:18 am

Re: Form field data not collected into either csv file nor MySQL

Post by petertj »

HI Pablo,

For the CSV
This was attempted as a primary choice and has not been confused with the MySQL operation.

Filezilla shows that the CSV file does exist and has read/write attributes. The location is that chosen when running the form wizard (/learnus/events).

I am more than happy to send you the php file but have forgotten how that can be done within this forum. I'll try the email route.

The sending an email option is currently working well but some of the field that are necessary could be better labelled - like the field name is called Name rather than Label. Each label must be unique.

kind regards

Peter
User avatar
Pablo
 
Posts: 21710
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form field data not collected into either csv file nor MySQL

Post by Pablo »

Filezilla shows that the CSV file does exist and has read/write attributes. The location is that chosen when running the form wizard (/learnus/events).
I cannot think of another reason for this error. The file is either in the wrong location or it is not accessible.
The location is that chosen when running the form wizard (/learnus/events).
The form wizard can only 'guess' the location based on the current configuration. So, you may need to double check the path. I suggest to keep it simple and keep it in the current folder.
In other words, remove the path and use the file name only.

The file you have sent me does not contain any useful information. There is no CSV or MYSQL configured for this form.
Did you send to correct file?
johnsmith0251
 
 
Posts: 209
Joined: Mon Aug 20, 2018 6:47 pm

Re: Form field data not collected into either csv file nor MySQL

Post by johnsmith0251 »

I had a similar issue. The wizard did not work for me - it looked like it was connecting the form to the cvs file, but I also got that error message when testing the live form. I use cpanel and own a lot of addon domains within one hosting package, so I was not sure if that was throwing things off. Anywho, I basically had to input the file location manually. Here's how it looks for me:

/home/cpanelusername/public_html/domain/file.csv

Hope this helps.
Post Reply