Never been to DZone Snippets before?

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

Yubnub "checkshortcut" command to check alias (See related posts)

   1  
   2  <?php
   3  
   4  if (!$link = mysql_connect('', '', '')) {
   5     echo 'Could not connect to mysql';
   6     exit;
   7  }
   8  
   9  if (!mysql_select_db('yub', $link)) {
  10     echo 'Could not select database';
  11     exit;
  12  }
  13  $sendto1 = mysql_query("select email from yubmail where mail_alias = '$path'");
  14  $sendto2 = mysql_result($sendto1, 0);
  15  
  16  if (!$sendto2) {
  17     echo "The alias does not exist! You can try to create one or send the message to mailinator ailas.";
  18  exit;
  19  }
  20  
  21  echo "The alias $path does exist!";
  22  ?>

You need to create an account or log in to post comments to this site.


Click here to browse all 5349 code snippets

Related Posts