Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['id_prod'])) {
- $ip = 'localhost';
- $username = 'blabla';
- $password = 'blublu';
- $database = 'bleble';
- $mysqlId = mysqli_connect($ip,$username,$password,$database);
- $id = $_POST['id_prod'];
- $query = "select id_sub,nama_sub,harga from msubproduk where id_prod='$id' order by id_sub";
- $result = mysqli_query($mysqlId,$query);
- while(list($s_id,$nama,$harga) = mysqli_fetch_row($result)) {
- $price = number_format($harga,0,',','.');
- echo "<option value='$s_id'>$nama [ Harga $price ]</option>\n";
- }
- mysqli_free_result($result);
- mysqli_close($mysqlId);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment