Nasıl mysql okuma ve http çıktı akımına aynı yazabilirsiniz.
So its like if send a request http://www.xyz.com/download/A it should return me data for A from mysql through php.
Veri düz metin.
Thanks PS: I am new to php.
Nasıl mysql okuma ve http çıktı akımına aynı yazabilirsiniz.
So its like if send a request http://www.xyz.com/download/A it should return me data for A from mysql through php.
Veri düz metin.
Thanks PS: I am new to php.
Bu sizinki ile değişkenler, tablo ve sütun nammes değiştirerek koduna uyum çalışması gerekir.
$sql = 'SELECT text FROM table WHERE id='.$id;
$result = mysql_query($sql, $conn) or die('SQL error');
$text = mysql_result($result);
header('Content-Type: text/plain');
echo $text;
Not çıktı rağmen, başlık göndermeden önce herhangi bir HTML veya boşluk olmamalıdır ki.
Umarım bu yardımcı olur.