multiple input database
why my script cant input to 2 table?
this is my script :
<?php
//if ($_POST['pelanggan']) {
//This makes sure they did not leave any fields blank
$user = $_POST['u'];
$norek = $_POST['n'];
$alamat = $_POST['a'];
$pass = $_POST['q'];
//if ($user!="" && $norek!="" && $alamat!="" && $pass!="") {
// Connects to your Database
include("koneksi.php");
$a = "insert into pelanggan ( nm_pelanggan,no_rekening,alamat,password)
values('$user','$norek','$alamat','$pass')";
$query = mysql_query($a);
$b = "select no_rekening from pelanggan where no_rekening = '$norek'";
$query = mysql_query($b);
$data = mysql_fetch_array($query);
$norek = $data[no_rekening];
$c = "insert into account (no_rekening) values('$b')";
mysql_query($c)
?>