When I try to run this query, it seems to not like the mysqli_insert_id($cxn) that I put in. Here is my code, and the error message that follows. Any ideas?
$query = "INSERT INTO person (personName,personAge,personSchool,personCity,personState)
VALUES ('$_POST[person_Name]','$_POST[person_Age]','$_POST[person_School]',
'$_POST[person_City]','$_POST[state]')";
$result = mysqli_query($cxn,$query)
or die ("Couldn't execute query");
$query = "INSERT INTO date (personId,comment)
VALUES ('mysqli_insert_id($cxn)','$_POST[Comment]')";
$result = mysqli_query($cxn,$query)
or die ("Couldn't execute query");
Catchable fatal error: Object of class mysqli could not be converted to string in