Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't Display data from mysql on table jquery mobile
    text
    copied!<p>to the point, I'm having trouble with jquery mobile. If i innactive the source from jquery my script run. but if I Activate the source of jquery, my php script didnt work.</p> <p>This my script</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;title&gt;Security&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;!--script for jquery source--&gt; &lt;link rel="stylesheet" href="jqm2/jquery.mobile-1.3.1.min.css" /&gt; &lt;script src="jqm2/jquery.js"&gt;&lt;/script&gt; &lt;script src="jqm2/jquery.mobile-1.3.1.min.js"&gt;&lt;/script&gt; &lt;!--script for jquery source--&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page" id="BahanBaku" class="type-interior" data-theme="c"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Bahan Baku&lt;/h1&gt; &lt;/div&gt;&lt;!-- /header --&gt; &lt;div data-role="content"&gt; &lt;form method="post" action="BahanBaku.php"&gt; &lt;!--this select button--&gt; &lt;select name="BARANG" data-native-menu="false" onchange="this.form.submit()"&gt; &lt;option value=""&gt;Pilih Nama Barang&lt;/option&gt; &lt;option value="A"&gt;A&lt;/option&gt; &lt;option value="B"&gt;B&lt;/option&gt; &lt;/select&gt; &lt;!--this select button--&gt; &lt;/form&gt; &lt;?php //this script for get data from mysql based the select button if(isset($_POST[BARANG])){ $barang = $_POST[BARANG]; //print_r($_POST); $sql2 = "SELECT * FROM tb_spekbaku WHERE namaBarang = '$barang' "; $hasil2 = mysql_query($sql2) or die ('Error = '. mysql_error()); $data2 = mysql_fetch_array($hasil2); } ?&gt; &lt;table data-role="table" id="table-column-toggle" data-mode="columntoggle" class="ui-responsive table-stroke"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Jenis Spec&lt;/th&gt; &lt;th&gt;Spec&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th&gt;Lain lain&lt;/th&gt; &lt;td&gt;&lt;?php echo $data2[lain];?&gt;&lt;/td&gt;&lt;!--this is the line when jquery inactive the result showed, but if jquery active the result not show again--&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt;&lt;!--end off content--&gt; &lt;div data-role="footer"&gt; &lt;h4&gt;Bla bla &lt;/h4&gt; &lt;/div&gt;&lt;!-- /footer --&gt; &lt;/div&gt;&lt;!--end of page--&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Can Anyone help me to Fix this? Im very appreciated your answer Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload