<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bilgisayar &#187; AngularJS</title>
	<atom:link href="https://www.bilgisayar.me/index.php/category/webtasarim/angularjs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bilgisayar.me</link>
	<description></description>
	<lastBuildDate>Wed, 29 Aug 2018 20:31:06 +0000</lastBuildDate>
	<language>tr-TR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.29</generator>
	<item>
		<title>AngularJS ile aranılan kelimeyi sorgulama</title>
		<link>https://www.bilgisayar.me/index.php/2015/06/26/angularjs-ile-aranilan-kelimeyi-sorgulama/</link>
		<comments>https://www.bilgisayar.me/index.php/2015/06/26/angularjs-ile-aranilan-kelimeyi-sorgulama/#comments</comments>
		<pubDate>Fri, 26 Jun 2015 23:30:35 +0000</pubDate>
		<dc:creator><![CDATA[Hakan Atılgan]]></dc:creator>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.bilgisayar.me/?p=916</guid>
		<description><![CDATA[AngularJS, PHP ve MYSQL ile aranılan kelimeyi varitabanında sorgulama. <a href="http://www.bilgisayar.me/dosyalar/angularara.zip" class="ozet yukle_color">YÜKLE</a> <a href="http://www.bilgisayar.me/demo/angularjs/sorgulama/index.php" class="ozet demo_color" target="_blank">DEMO</a>]]></description>
				<content:encoded><![CDATA[<p>İlk önce <span class="su-label su-label-type-success">ara.htm</span> veya <span class="su-label su-label-type-success">ara.php</span> sayfası oluşturalım.</p>
<pre class="prettyprint linenums" >
&lt;!DOCTYPE html&gt;
&lt;html ng-app&gt;
&lt;head&gt;
&lt;title&gt;AngularJS ile sorgulama&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css&quot;/&gt;
&lt;script src=&quot;http://code.angularjs.org/angular-1.0.0.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;ara.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div ng-controller=&quot;AraCtrl&quot;&gt;
    &lt;form class=&quot;well form-search&quot;&gt;
        &lt;label&gt;Ara:&lt;/label&gt;
        &lt;input type=&quot;text&quot; ng-model=&quot;kelimeler&quot; class=&quot;input-medium search-query&quot; placeholder=&quot;kelime girin...&quot;&gt;
        &lt;button type=&quot;submit&quot; class=&quot;btn&quot; ng-click=&quot;sorgula()&quot;&gt;Şehir Ara&lt;/button&gt;
        &lt;p class=&quot;help-block&quot;&gt;&quot;Adana&quot; veya &quot;Burdur&quot;&lt;/p&gt;	
    &lt;/form&gt;
    &lt;pre ng-model=&quot;result&quot;&gt;
        {{result}}
    &lt;/pre&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Daha sonra <span class="su-label su-label-type-success">ara.js</span> sayfası oluştralım.</p>
<pre class="prettyprint linenums" >
function AraCtrl($scope, $http) {
    $scope.url = &#039;ara.php&#039;;
		
    $scope.sorgula= function() {
        $http.post($scope.url, { &quot;data&quot; : $scope.keywords}).
        success(function(data, status) {
            $scope.status = status;
            $scope.data = data;
            $scope.result = data;
        })
        .
        error(function(data, status) {
            $scope.data = data || &quot;Hata Olustu...&quot;;
            $scope.status = status;			
        });
    };
}
</pre>
<p>Son olarak da <span class="su-label su-label-type-success">ara.php</span> sayfası oluşturalım.</p>
<pre class="prettyprint linenums" >
&lt;?PHP include (&quot;db.php&quot;);
// $_POST veya $_GET kullanılmıyor!
     
$veri = file_get_contents(&quot;php://input&quot;);
     
$objData = json_decode($veri);
     
$q = &#039;SELECT * FROM `iller` WHERE sehir LIKE &quot;%&#039;.$objData-&gt;data.&#039;%&quot;&#039;;
$res = $mysqli-&gt;query($q);	
//echo $q;    
$liste=&#039;&#039;;   
if ( $res-&gt;num_rows &gt; 0 ){
	while($nt = $res-&gt;fetch_array()) {
		$liste .= $nt[&#039;sehir&#039;].&#039;, &#039;;
	}
	echo substr($liste, 0, -2);
} else {
	echo &#039;Kayıt bulunamadı....&#039;;	
}
?&gt;
</pre>
<p></p>
<div style="text-align:center; width:100%">
<a href="http://www.bilgisayar.me/demo/angularjs/sorgulama/index.php" target="_blank" class="buttons btn_red left"><span class="left">Demo</span></a>
<a href="http://www.bilgisayar.me/dosyalar/angularara.zip" target="_self" class="buttons btn_blue left"><span class="left"><i class="fa fa-download"></i> YÜKLE</span></a>
</div>
<p>&nbsp;<br />
&nbsp;<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.bilgisayar.me/index.php/2015/06/26/angularjs-ile-aranilan-kelimeyi-sorgulama/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
