hello,
i'm trying to add data collected from a form into a db. No errors are showing, but the data isnt being added to the db.
also, when the process is finished the page is not being redirected.
heres the code that i'm using.
<?php
$db = mysql_connect("localhost", "root"
;
mysql_select_db("fjc",$db);
$barrister = mysql_query("INSERT INTO barristers (bar_id, fst_name, lst_name, floor, phone, year, file, created, modified) VALUES ('','$first_name', '$last_name', '$floor', '$phone', '$year', '$file', NOW(), NOW())",$db);
?>
<?php
$db = mysql_connect("localhost", "root"
;
mysql_select_db("fjc",$db);
$admis_id=$_GET[admis_id]?$_GET[admis_id]:0;
$admissions = mysql_query("INSERT INTO bar_admis (bar_id, admis_id) VALUES (LAST_INSERT_ID(), '$admis_id')",$db);
?>
<?php
$db = mysql_connect("localhost", "root"
;
mysql_select_db("fjc",$db);
$area_id=$_GET[area_id]?$_GET[area_id]:0;
$area = mysql_query("INSERT INTO bar_area (bar_id, area_id) VALUES (LAST_INSERT_ID(), '$area_id')",$db);
?>
<?php
header("Location: ?>
thanks for all your help
dunskii
i'm trying to add data collected from a form into a db. No errors are showing, but the data isnt being added to the db.
also, when the process is finished the page is not being redirected.
heres the code that i'm using.
<?php
$db = mysql_connect("localhost", "root"
mysql_select_db("fjc",$db);
$barrister = mysql_query("INSERT INTO barristers (bar_id, fst_name, lst_name, floor, phone, year, file, created, modified) VALUES ('','$first_name', '$last_name', '$floor', '$phone', '$year', '$file', NOW(), NOW())",$db);
?>
<?php
$db = mysql_connect("localhost", "root"
mysql_select_db("fjc",$db);
$admis_id=$_GET[admis_id]?$_GET[admis_id]:0;
$admissions = mysql_query("INSERT INTO bar_admis (bar_id, admis_id) VALUES (LAST_INSERT_ID(), '$admis_id')",$db);
?>
<?php
$db = mysql_connect("localhost", "root"
mysql_select_db("fjc",$db);
$area_id=$_GET[area_id]?$_GET[area_id]:0;
$area = mysql_query("INSERT INTO bar_area (bar_id, area_id) VALUES (LAST_INSERT_ID(), '$area_id')",$db);
?>
<?php
header("Location: ?>
thanks for all your help
dunskii