Data entry - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Data entry

monsenmonsen Posts: 2Member
Hello guys!
I'm making a multi-lingual dictionary. I have a problem with the data entry. I want to check if the word already exists in dictionaries database. if yes, notify me, else, insert it. Also the English table should contain this word. for example, the word feu = fire in french, if I added it, my script should check if 'fire' exists in english dictionary, if not add it.
I get funny results. I know it's due to a mistake in my code. I need your help.

[code]


A:active
{
font-weight:bold;color:orange;
text-decoration:none;
}
A:hover
{
font-weight:bold;
color:crimson;
text-decoration:underline;
}
UL
{
font-weight:bold;color:royalblue;
} echo ".$dictionary." database entry

";

if(mysql_num_rows($check)>0)
{
print "
".$word." already exists in ".$dictionary." database";
}
else
{
mysql_query($query,$con)or die('couldnt execute query:'. mysql_error());
print " image 

$dictionary Database entry


















Word $word
Translation $translation
Word Type $wordtype
Dictionary $dictionary
";
}
if(mysql_num_rows($checkEnglish)!=0)
{
print "
$translation is already found in the English dictionary";
}
else
{
mysql_query($updateEnglish,$con);
echo "$translation was not found in English dictionary, I just added it there.
";
}



mysql_close($con);
?>


Ok
[/code]
thanks

Sign In or Register to comment.