title: Making birthday function for wordpress
body: <p>I'm trying to make birthday function that suppose to pull informations from database and give name, surname etc. of person that is bithday on that day.Am I on a good way? I make something like this:</p>
  
  <pre><code>&lt;?php
  
  function birthday($year){
  
  
  extract(shortcode_year(array('how_many_days'=&gt;'1'),$year));
  require('./wp-load.php');
  
  global $wpdb;
  
  for($i=0; $i&lt;=$how_many_days; $i++)
  {
  
  $day = $i*24*60*60;
  
  for($j=18; $j&lt;=75; $j++){
  
  $past_day=mktime(0,0,0, date(n,time()), date(j,time()), date(Y, time()) - $j) + $day;
  
  $results=$wpdb&gt;get_results("SELECT first_name, last_name, date_birthday,private_id, responsible FROM wp_participants_database WHERE date_birthday=$past_day");
  
  foreach($results as $result): $brojac=$brojac+1;
  
  echo '&lt;TR&gt;&lt;TD align=right&gt;', $j, 'ans:', $result-&gt;first_name, '&lt;/TD&gt;&lt;TD&gt;&lt;B&gt;',
  $result-&gt;last_name, '&lt;B&gt;&lt;/TD&gt;&lt;TD&gt;', $result-&gt;private_id, date(Y,$result-&gt;date_birthday),"/", 
  date(m, $result-&gt;date_birthday), "/", date(d, $result-&gt;date_birthday),'&lt;/TD&gt;&lt;/TR&gt;=&gt;', $result-&gt;responsible,'&lt;br/&gt;';
  endforeach;    
  
     }
    }
   }
  
  add_shortcode('birthday', 'birthday');
  
  ?&gt;
  </code></pre>