id; $surveyid=$obj->survey_id; $db_name=$obj->db_name; $new_mail=$obj->email; $sql_temp = "SELECT * FROM $db_name.survey WHERE survey_id='$surveyid'"; $res_temp = api_sql_query($sql_temp, __FILE__, __LINE__); $obj_temp=@mysql_fetch_object($res_temp); $template=$obj_temp->template; switch($template){ case template1: header("location:template1.php?temp=$template&surveyid=$surveyid&mail=$new_mail&db_name=$db_name"); break; case template2: header("location:template2.php?temp=$template&surveyid=$surveyid&mail=$new_mail&db_name=$db_name"); break; case template3: header("location:template3.php?temp=$template&surveyid=$surveyid&mail=$new_mail&db_name=$db_name"); break; case template4: header("location:template4.php?temp=$template&surveyid=$surveyid&mail=$new_mail&db_name=$db_name"); break; case template5: header("location:template5.php?temp=$template&surveyid=$surveyid&mail=$new_mail&db_name=$db_name"); break; } ?>