i have a couple of variables that i want to save or not save to a database depending on whether or not i have set them as hidden/visible in a javascript function, i have searched for a while but cant find anything. Thanks!
That's absolutely impossible since PHP runs on the server while JavaScript and CSS are client-side.
The only thing you can do is checking if the element is visible using JavaScript and sending that data to your PHP script, e.g. via a hidden <input>
field.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With