JQM and PHP, SQL (Phonegap)
Hello,
I tryed to connect with my mysql database and JQM page. The only idea that I had was PHP so i created a mysql database and a PHP page where i can administrate the database.
- <?php
##############################################
require_once 'pwd_inc.php';
require_once 'connect_inc.php';
##############################################
$sql = "SELECT * FROM News";
if ( isset ($_GET['sortby']) ) {
$sortby = $_GET['sortby'];
$sql .= " ORDER BY $sortby";
}
$r = mysql_query($sql);
if ( false == $r ) {
die('<hr />Error: SELECT!
Error: ' . mysql_error() . 'Error-Nr: ' . mysql_errno());
}
// OK!
echo '<ul data-role="listview" data-split-icon="arrow-r" data-split-theme="a">';
while( $t = mysql_fetch_array($r)) {
echo '<li>
<a href="pnewsdetail.php?action=edit&id=' . $t['id_news'] . '" data-transition="fade">
<img src="' . $t['pic_path'] . '" />
<h3>' . $t['news_headline'] . '</h3>
<p>' . $t['news_description'] . '</p>
</a>
</li>';
}
echo '</ul>';
?>
And this is my result ^^ (btw it works on a normal server where i installed php)
So i think that Phonegap / JQM does not support PHP. Is there a possibility to run PHP on Phonegap or do you have an idea to let that script run on Javascript / JQuery?
Im not so familiar with that...
Thx a lot! :-)