Can't access the right table

[php]<?php

// contact to database

$con = mysql_connect(“","”,"*****");
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}

mysql_select_db( ‘a7107275_dataz’ , $con);

if (!$con)
{
die('Could not connect: ’ . mysql_error());
}

$query=“insert into contact(name,class,location,reason,experience,help,level,danceparty,donate,Time) values(’$v_name’,’$v_class’,’$v_location’,’$v_reason’,’$v_experience’,’$v_help’,’$v_level’,’$v_danceparty’,’$v_donate’,’$v_Time’)”;

mysql_query($query) or die(mysql_error());

echo “Your message has been received”;
?>[/php]

When i rune this i get the message “Table ‘a7107275_dataz.contact’ doesn’t exist”, Why is it adding the contact to the and of the table name? other then that i think it should work fine.

Thanks in advance

Because you can have different databases within the same script. its telling you that it can’t find the contact table in the 'a7107275_dataz database. Check the spelling and that the contact table does actually exist.

HI richei
have you created that database ‘a7107275_dataz’???

Why would I create it?

Kelly, one more note: Caps are very important. “Contact” is not the same as “contact”. Richei is correct, it is most likely a spelling issue…

Sponsor our Newsletter | Privacy Policy | Terms of Service