By Wathfea on
Hello,
I have a problem with one of my module what I can't understand at all.
The module worked properly under Drupal 6 but now when I re-write it to D7 it doesn't want to work.
Now what I figured out the problem root is in the database handle.
Here is a peek:
$id = db_insert('gft_demo')
->fields(array(
'demoid' => $username,
'first_name' => $form_state['values']['first_name'],
'last_name' => $form_state['values']['last_name'],
'country' => $form_state['values']['country'],
'iskola' => $form_state['values']['iskola'],
'email_address' => $form_state['values']['email_address'],
'phone' => $form_state['values']['phone'],
'initial_deposit' => $form_state['values']['initial_deposit'],
'base_currency' => $form_state['values']['base_currency'],
'username' => $username,
'gft_timestamp' => date('o-m-d h:i:s'),
))
->execute();
If I use my module without this section It's working well, but I need to store these data in the DB, so any help would be great.
I doesn't get any error msg.
Any idea?
Thanks a lot,
David
Comments
What's the problem?
What's the problem?
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
The problem
I got no error msg.
I doesn't have any new database row.
The form post breaking , and I doesn't have a redirect.
Here is the full code:
So after I submit the form, the site doesn't do anything. It doesn't insert data to the db, doesn't send the mails. Simply do nothing.
If I cut out the db insert section the code working well. Sending the mails and redirect to the Thank you node.
No errors in the log table.
Try using
Try using drupal_http_request() instead of curl functions.
Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.
Solved
Thankxós dor te help, but the problem solved in different way. The problem was in the database. The table somehow went to crazy... I delete it and recreate it again and now everything works fine.