I have following insert statement, it work fine if the PName doesn't have (') value, but when the text contain of ('), the query will return with syntax error. Any idea how to fix this? many thanks.
$queryinsert = "INSERT INTO CART (CartPID, CartPName, CartPrice,CartCustID, CartDate) values ( $pid, '$PName', $PPrice, $CustID, (NOW()))";