im having problem with my this,
what i want to happen is when i submit, i want to save those records from 2 diffrent
table's from my db, but it wont save? have you seen any problem with my code?
thanks!

<?php
	include("connect.php");
	if(isset($_POST['submit']))
	{
	mysql_query("insert into tblgrading set idno='$_POST[id]',
	lastname='$_POST[lname]',
	firstname='$_POST[fname]',
	grading='$_POST[grading]',
	year='$_POST[year]',
	english='$_POST[eng]',
	math='$_POST[mat]',
	filipino='$_POST[fil]',
	makabayan='$_POST[mak]',
	skmsep='$_POST[msep]',
	chareduc='$_POST[chared]',
	genave='$_POST[ave]'");
	mysql_query("insert into attendance set idno'$_POST[id]',
	lastname='$_POST[lname]',
	firstname='$_POST[fname]',
	month='$_POST[month]',
	dpresent='$_POST[dpresent]',
	dabsent='$_POST[dabsent]'");
	}
	?>

Could you please tell us what the errors are? Also, noticed a few things:

1) Your "idno" should be set as AUTO_INCREMENT inside your database.
2) You should define your variables better, or, at least define them and run some checks on them before they get entered into the database.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.