If request name already exist in database .. show error ?

Hello,
How to make this ?
if the request name that wrote in the field already exist in database show error ?

Here is code that shows the successful and error message :

[php] $send = $mail->Send();

			if($send)
			{
				$success = true;
			}
			else
			{
				$success = false;
			}
		}
		if($success == true)
		{
			$DevCP->msg("showmsg", "Sent", '80%', $bg);
		}
		else
		{
			$DevCP->msg("showerror", "Error, try again later", '80%', $bg);
		}

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service