DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Yubnub "checkshortcut" Command To Check Alias

11.06.2005
| 2333 views |
  • submit to reddit
        
<?php

if (!$link = mysql_connect('', '', '')) {
   echo 'Could not connect to mysql';
   exit;
}

if (!mysql_select_db('yub', $link)) {
   echo 'Could not select database';
   exit;
}
$sendto1 = mysql_query("select email from yubmail where mail_alias = '$path'");
$sendto2 = mysql_result($sendto1, 0);

if (!$sendto2) {
   echo "The alias does not exist! You can try to create one or send the message to mailinator ailas.";
exit;
}

echo "The alias $path does exist!";
?>