Postingan lainnya
Parse error: syntax error, unexpected 'if' (T_IF) in
ini if nya kenapa yah om pas load data di modal ...
<?php
include "conection.php"
if($_POST['rowid']) {
$id = $_POST['rowid'];
$sql = mssql_query("SELECT * from [cust_pric] where cp_cid='$id'");
while ($row = mssql_fetch_array($sql)){ ?>
<table class="table">
<tr>
<td>cp_mate</td>
<td>:</td>
<td><?php echo $row['cp_mate']; ?></td>
</tr>
<tr>
<td>cp_hues</td>
<td>:</td>
<td><?php echo $row['cp_hues']; ?></td>
</tr>
<tr>
<td>cp_width</td>
<td>:</td>
<td><?php echo $row['cp_width']; ?></td>
</tr>
</table>
<?php
}
}
?>
2 Jawaban:
Jawaban Terpilih
bagian
<pre>include "conection.php"</pre>
tidak ada ; (titik koma), coba ubah
<pre> include "conection.php"; </pre>
sudah gan tapi data nya tidak kepanggil di modal itu kenapa yah gan?
<pre> <?php include "conection.php";
if($_POST['rowid']){ $id = $_POST['rowid']; $sql = mssql_query("SELECT * from [cust_pric] where cp_cid='$id'"); while ($result = mssql_fetch_array($sql)) foreach ($result as $baris){ ?> <table class="example"> <tr> <td>cp_mate</td> <td>:</td> <td><?php echo $baris['cp_mate']; ?></td> </tr> <tr> <td>cp_hues</td> <td>:</td> <td><?php echo $baris['cp_hues']; ?></td> </tr> <tr> <td>cp_width</td> <td>:</td> <td><?php echo $baris['cp_width']; ?></td> </tr> </table> <?php
}
}
?> </pre>