In my local test environment, I uploaded information to tables using POST data no problem. I'm doing some testing on a live domain now on my host's servers, and am getting an error when using the same techniques.
The table is called User_Information
, and I know it exists by checking phpMyAdmin. It was created using script.
Here in brief is the code being used to insert information to the table, using CodeIgniter framework. This is a summary, and am certain that the syntax of the true code is fine:
['database' library is already autoloaded and connected]
$first = $this->input->post('firstname');
$last = $this->input->post('lastname');
$email = $this->input->post('email');
$city = $this->input->post('city');
$state = $this->input->post('state');
$insert = array(
'First_Name' => $first,
'Last_Name' => $last,
'Email' => $email,
'etc' => $etc,
);
$this->db->insert('User_Information', $insert);
And the error being thrown:
Error Number: 1146
Table 'myDatabase.sqUser_Information' doesn't exist
INSERT INTO `sqUser_Information` (`First_Name`, `Last_Name`, `Email`, `etc`)
VALUES ('Leonhard', 'Euler', 'Elias@euler.com', 'Select One')
Filename: models/Process_form.php
Line Number: 56
The issue is the value getting submitted for the table name -- from the error, it looks like it is looking for a table called sqUser_Information
instead of the provided User_Information
. I don't know where the 'sq' is coming from, or why it is getting prepended to my table, nor have I yet been able to find other similar situations online.
I would like to be able to access and insert data into my table, but cannot do so at the moment because of this faulty name being passed.
Any suggestions?