D

Connecting to database

16 viewed last edited 11 months ago
Anonymous
0
I am trying to save the data users input in my feedback form to my database. I used PHP to link them but every time I fill out the form, the information is not saved. feedback List

feedback List

\n"; foreach ($dataArray as $col_value) { echo "\t\n"; } echo "\n"; } // Free resultset mysql_free_result($queryexe) or die('Could not free result: ' . mysql_error()); //disconnect from database mysql_close($connectionstring) or die('Could not close database: ' . mysql_error()); ?>
Name Feedback Score Product
$col_value
Vivekanand Vellanki
0

We would love to help. Unfortunately, your question is not clear enough.


Lets break it down into steps:

  1. Is your html taking the input correctly? Have you verified this?
  2. Is your html invoking the php (controller) logic with the correct parameters? Add debug logging in the html and php to verify that this is the case.
  3. Is the php code doing what it is supposed to do? Add debug logging in several places to understand what it is doing vs. what it is supposed to do


Lets start with 1, is the form in html correct? Please share the html so we can help you with this.


Next, share the html where the data is submitted to php. And, the php function that accepts this data and writes the data to the database.