on phpmyadmin, on lefthand side I see list of all databases including testdata. I click on users. I clicked add user. for username I put testuser. For password, I put what matches in my code. for "database for user" I left it at none.
for global privileges I had it check all. then I clicked the add user button. then i went to "edit privileges" on testuser from the phpmyadmin.
under "Add privileges on the following database:" I clicked on testdata. then under
Database-specific privileges for the testdata i clicked check all. then i clicked the go button.
anyway, for the code to connect I have this:
<?php
$con = mysql_connect('localhost', 'testuser', 'xxxxxxxxx') or die ('Failed to connect to the database: '.mysql_error());
mysql_select_db ('testdata',$con);
?>