- Messages
- 7
- Reaction score
- 0
- Points
- 16
paano po ba mag insert ng isang value second table if exists cya table1
table 1
if(isset(&_POST['submit'])){
$studentid=&_POST['studentidnum'];
$firstname=&_POST['firstname'];
$lastname=&_POST['lastname'];
$query = "insert into table1 (studentidnum,firstname,lastname) values('$studentid','$firstname',$lastname')";
$result = mysql_query($query) or die ('error');
ang gusto ko po kapag ang user mag input ng student id number dapat exists cya sa table1 if exists insert cya sa table2 at kng hindi exists may link na register
please help po anong e code ko
thanks po
table 1
if(isset(&_POST['submit'])){
$studentid=&_POST['studentidnum'];
$firstname=&_POST['firstname'];
$lastname=&_POST['lastname'];
$query = "insert into table1 (studentidnum,firstname,lastname) values('$studentid','$firstname',$lastname')";
$result = mysql_query($query) or die ('error');
ang gusto ko po kapag ang user mag input ng student id number dapat exists cya sa table1 if exists insert cya sa table2 at kng hindi exists may link na register
please help po anong e code ko
thanks po