Jump to content

Recommended Posts

[code]
$query = INSERT INTO users (username, first_name, last_name, password, registration_date, phone_num, secretAU, secretQU, secretAP, secretQP, fax_num, email) VALUES ('doni49', 'Don', 'Ireland', PASSWORD('kirsten'), NOW(), '215-932-2391', 'Jennifer', 'What was your first girlfriend\'s name?', 'Deland', 'What is your father\'s middle name?', '508-546-0464', 'don@donireland.com')

$result = @mysql_query ($query); // Run the query.
[/code]

It fails to add the data to the DB. I've confirmed that the script IS logging in. The user has "ALL PRIVILEDGES" to the DB. The "result" variable ends up with NO value.

[code]
echo '<br><br><br>Hi<br>' . $result . 'Bye<br><br><br>';
[/code]

The above shows this:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]


Hi
Bye
[/quote]

I THINK it might have something to do with the "Collation" in the user table fields, when I try to remove the collation via phpMyAdmin, it says they were altered. But then when I check the user table structure, the collation is back.

I've attached an image showing the table structure in phpMyAdmin.
[img src=\"http://67.62.63.125/usertable.jpg\" border=\"0\" alt=\"IPB Image\" /]

Can someone help me track this down?

TIA1
Link to comment
https://forums.phpfreaks.com/topic/3238-cant-add-record-to-db-table/
Share on other sites

Thanks for taking the time to reply. I found it last night. I don't remember removing it, but one of the fields that the posted script was trying to add data to was not there. Therefore it was failing.

The only thing I could find that looked out of the ordinary was that "collation" stuff--Latin Swedish?

Rather than post back here saying "never mind", I figured I'd let the thread die.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.