Şöyle bir hata aldım hocam
Hata meydana geldi!You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' nick) VALUES (NULL, '')' at line 1NULL NULL

ekle.php son hali
include 'baglan.php';
if($_GET['yeni'] and $_GET['yeni']=='kayit'){
$acilirmenu = ($_POST['acilirmenu']);
$nick = ($_POST['nick']);

// echo " $dropdown isimli uyulamaya sectiginiz nick $nick"
$ekle = mysql_query("INSERT INTO platform (id, ".$acilirmenu.", nick) VALUES (NULL, '".$nick."')");
if($ekle){
echo "Mesajınız kaydedildi!";
}else{
echo "Hata meydana geldi!";
}
}

echo mysql_error();

var_dump($acilirmenu);
var_dump($nick);
?>


index.php formun son hali

$name = 'acilirmenu';
$options = array('0'=>'Kik','1'=>'WhatsApp','2'=>'Line','3'=>'Skype','4'=>'WeChat','5'=>'BBM');
$selected = $acilirmenu;
echo dropdown( $name, $options, $selected );
?>
function dropdown( $name, array $options, $selected)
{
/*** begin the select ***/
$dropdown = ''."\n";

/*** and return the completed dropdown ***/
return $dropdown;
}
?>

Paylaş!