Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.