dig. i see what y'all are saying... thanks for that info!! 🙂
so-- in retrospect, it looks like i really made it more difficult on myself by hashing all of this out so methodically-- maybe had something to do w/ preparing for what would be coming after this, but probably more a matter of forgetting the conventions. i had been doing a lot of stuff w/ arrays, foreach vs for and while, etc
i think i was originally looking for the way NogDog did it... and w/out refer'ing anything, that's what i came up with. (since then, i've gotten much more refreshed on everything-- ha! still probably would have forgot the simple while loop like NogDog showed...
(it may be worth nothing that there are six other tables in this db, four of which will correspond to that "room" id... i dunno... blah, blah..)
$_SESSION['event']=$_POST['event'];
$_SESSION['month']=$_POST['month'];
$_SESSION['day']=$_POST['day'];
$_SESSION['year']=$_POST['year'];
$_SESSION['room']=$_POST['room'];
$_SESSION['details']=$_POST['details'];
$calendar = $_SESSION['year'].'-'.$_SESSION['month'].'-'.$_SESSION['day'];
$eventinsert = mysql_query("INSERT INTO event(calendar,event,room,detail) VALUES ('".$calendar."','".addslashes($_POST['event'])."','".addslashes($_POST['room'])."','".addslashes($_POST['details'])."')") or die(mysql_error());
$entryno = mysql_insert_id();
$queryrow = "SELECT * FROM event WHERE master_id = $entryno";
$result = mysql_query($queryrow,$dblink) or die(mysql_error());
$number = mysql_num_fields($result);
$db_row = mysql_fetch_array($result);
$db_fields = array('master_id','editing','calendar','event','room','detail');
for($fields_x=0;$fields_x<=($number-1);$fields_x++){
$db_fields[$fields_x] = $db_row[$fields_x];
}
cheers, pleased to meet you, and thanks again! 😉
EDIT: PS-- if i want to grab the field names and the table name itself-- from the recent query, or any query-- how is that done (the function name)? thanks!