Give the gift of Drupal. All merchandise is 50% off through 2016.
So, I've been working at this and searching forums for quite some time and have tried many different options and still can't figure out what the issue is. I've been working with PHP for several years, but I'm still pretty new to Drupal. I'm working on some code that I want to simply take input form a form then insert into a database table called 'dr_rower_results', my code is below:
This code is in a block with text format set as PHP code. I believe I have narrowed this down to it being an issue with the db_insert (also tried db_query('INSERT INTO... ). If I remove the db_ function then the form clears and shows the message "Your form has been submitted" followed by my two inputs. If I keep the db_ function there then on submit the page simply brings me to my drupal user page and does not make an insert into the database.
Any help would be much appreciated.