function display_gift_dropdown($curr_id)
{
// this function creates the html to display the available gifts in a dropdown for admin selection
// create the sql query
$sql = "SELECT * FROM gift";
$recs = executeSQL($sql);
if ( mysql_numrows($recs) > 0 )
{
// create dropdown
$function_ret = '<select name="gift" onchange="location.href=\'' . $_SERVER['PHP_SELF'] . '?select=\'+this.options[this.selectedIndex].value;">';
// add prompt and New Gift
$function_ret .= '<option value="0"';
if ( $curr_id == '0' )
{
$function_ret .= ' selected';
}
$function_ret .= '>Select Gift...</option><option value="N"';
if ( $curr_id == "N" )
{
$function_ret .= ' selected';
}
$function_ret .= '>Add New</option>';