I’m trying to insert values into one table from another table as well as the variable which stores the username. The code below is currently what I have but it’s returning errors. (Currently don’t have access to my code to give the errors) There is a connection to the database above this.
<?php
session_start();
$users = $_SESSION['username'];
$sql = “INSERT INTO squads(username,
age, name, rating, value) VALUES
$users AND SELECT FROM players
age, name, rating, value”;
mysqli_query($connection, $sql)