im getting unexpected '$sql' when I run this code.. and idont know why..


    $pid = $_POST['pid2'];
    $name = $_POST['name']

$sql="INSERT INTO tbl_wishlist (prod_id, name)
    (select prod_id, image from tbl_product where prod_id ='$pid' AND image ='$name' )";

}else{ echo 'mali';}


Recommended Answers

Place a semicolon at the end of:

$name = $_POST['name']
Jump to Post

All 2 Replies

Member Avatar

Place a semicolon at the end of:

$name = $_POST['name']
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.