Form Taglarınıda kullanmanıza Gerek Yoktur onlarıda silip yerine Güzel stil uygulama adına "li" tagları ekleyebilirsiniz
Önemli: Kod Bu Haliyle Çalışmayacaktır.. $connection->get i Kullanabilmek için gerekli dosya veye fonksiyonun include edilmiş olması gerekir bilginize..
Yani bu $connection->get twitter.php dosyasındaysa Bu Sayfamıza twitter.php yi include etmemiz gerekir kodun çalışması için..
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="js/Jquery10.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.button').click(function(){
islem=$(this).attr('name');
twit_id=$(this).parent().find('.m-wrap').val();
if(islem=="fav")
{
adres="favori.php";
}else{
adres="retwit.php";
}
yolla="twit_id="+twit_id;
$.ajax({
type: "post",
url: adres,
data :yolla,
success : function(cevap){
alert(cevap);
//$("#goster").html(cevap);
}
});
});
});
</script>
</head>
<body>
<?php
$username="kullaniciadi";
$tweet = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$username."&count=10");
foreach ($tweet as $ayikla)
{
echo'<article class="box is-post">';
echo '<b>'.$ayikla->text.'</b>';
$tweetidsi = $ayikla->id_str;
echo'
<form method="post" action="index.php?islem=fav" ><input name="favid" type="text" class="m-wrap" value="'.$tweetidsi.'" /> <input name="fav" type="button" class="button" value="10 Favori Ekle"/></form>
<form method="post" action="index.php?islem=rt" ><input name="rtid" type="text" class="m-wrap" value="'.$tweetidsi.'" /> <input name="rtw" type="button" class="button" value="10 Retweet Ekle"/></form>
</article>';
}
?>
</body>
</html>
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 16:20:36 -->-> Daha önceki mesaj 15:54:15 --
Son Düzeltmeyi Yaptım Hocam..
$( document ).delegate(".button", "click", function(e) { // Burayı atlamışım çalışma zamanı oluşturulan düğmelere bu şekilde ulaşırsınız Ben direk dosyay ekleyip çalıştırdığım için sorun yaşamamıştım
tmmdır hocam çalıştı allah razı olsun teşekkürler