Form Data to MySQL

Issues related to forms.
Post Reply
johnsmith0251
 
 
Posts: 211
Joined: Mon Aug 20, 2018 6:47 pm

Form Data to MySQL

Post by johnsmith0251 »

When the form data is sent to the mysql database - all the entries before it gets re-writen to the latest data that comes through. So no matter how many entires I have, they are all the same lol Any ideas?
wwonderfull
 
 
Posts: 1277
Joined: Fri Aug 21, 2020 8:27 am

Re: Form Data to MySQL

Post by wwonderfull »

To know what you have done we need a demo of your project. I never have issues with form data to mysql its normal.I am sure you have done something incorrect on the settings maybe that is the cause.
Last edited by wwonderfull on Tue Jul 19, 2022 7:00 am, edited 1 time in total.
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form Data to MySQL

Post by Pablo »

Maybe your database does not a have a primary key?
To be able to help you, I needs to know your complete setup.
Adrian
 
 
Posts: 84
Joined: Tue Jun 13, 2017 4:44 pm

Re: Form Data to MySQL

Post by Adrian »

Hello johnsmith0251,

please check if the "ID" field of table where you want to introduce data is defined as "autoincrement".

Regards, Adrian
Best Regards, Adrian

Rogarema.net
johnsmith0251
 
 
Posts: 211
Joined: Mon Aug 20, 2018 6:47 pm

Re: Form Data to MySQL

Post by johnsmith0251 »

pablo & adrian - thank you! I added ID autoincrement PrimaryKey and it works.

The only wishlist item is being able to see what page the form submitted from. In advanced options, I have the "include page name/referer in form data" but it does not come through in the data base.

Any thoughts?
User avatar
Pablo
 
Posts: 21720
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form Data to MySQL

Post by Pablo »

Maybe it is blocked somewhere? For example, in the privacy settings of the browser.

The script uses standard PHP functionality:
$_SERVER['SERVER_NAME']
$_SERVER['PHP_SELF']
johnsmith0251
 
 
Posts: 211
Joined: Mon Aug 20, 2018 6:47 pm

Re: Form Data to MySQL

Post by johnsmith0251 »

I feel silly :shock:

I can simply push through the form name lol
Post Reply