How to Add mysql foreign key from another table primary key in php :   <?
  $connect->exec("INSERT INTO questions 
	(questions_points, questions_ask, answer_option, contest_id) 
	VALUES ('$questionspoints', '$questionsask', '$answeroption', '$lastid') ");
    
    $connect->exec(" INSERT INTO answers(choice_option, questions_id)
	VALUES('$choiceoption', what should i add here except last id because it is not working , I want to add the questions primary key)");
?>