In this excerpt, sql is deciding not to be very friendly and is returning no errors but will not execute correctly. newquery works fine, its newquery2 I am having an issue with. In newquery 2 Ive put quotes around $username, removed them, put single quotes removed them, as well the same with just username. Does anyone know what the issue is?
[php]<?php
if($cartrow[‘cart’] == no){
echo "You currently have no cart
build cart,
<?php $username = $_SESSION['user']['username'];
if(isset($_POST[‘submit’])){
$newquery = mysqli_query($conn, “UPDATE users SET cart = ‘yes’ WHERE username=’$username’”) or die(mysqli_error($conn));
$newquery2 = mysqli_query($conn, “INSERT INTO resources (username) VALUES ($username)) or die(mysqli_error($conn)”);
header(“Refresh:0; url=home.php”);
}
?>[/php]