I want to save all the records that contain a "table A"
in another "table B" when pressing submith event "button save current period
Currently, my main page already contains 2 forms and I thought that to avoid saturating my tables and editable fields anymore,
I decided that I would prefer a "link" button that guides me to save_period.php
where only run:
INSERT INTO tabla B SELECT * FROM tabla A
and I returned to insert the table with:
header("location: index.php");
My problem starts in that additionally I want to add an additional value for an extra field that has the "table B" that is period who has to attach the date when this record was added
my example:
INSERT INTO tabla B ('nombre','email','current_time')
SELECT * FROM 'Tabla A'
but I think I'm doing it wrong:
<?php
include "conn.php";
// (variable con el querry = $conn )
INSERT INTO tabla B ('nombre','email','current_time')
SELECT * FROM 'Tabla A';
header("location: dashboard.php");
?>
Could someone tell me what I'm doing wrong?