I have this php code. I am connected successfully to access database, i can retrieve data just fine. However when i want to add a row I'm having an error. If i enter all integer values, the sql is properly working but when one input is a string the statement fails. I need to know the error I'm getting so i can tell what to fix.
This is my php function to add the row
$sql = "INSERT INTO Connections (ServerName, DatabaseName, UID,PWD, Type,Port)
VALUES (".$_POST['serverip'].", ".$_POST['dbname'].", ".$_POST['dbuid'].",".$_POST['dbpwd'].",".$_POST['dbtype'].",".$_POST['dbport'].")";
$rs = $GLOBALS['dbNew']->query($sql);
if($rs){echo"<br/>Connection Submitted Successfully";}
else {echo "<br/>Connection Submittion Failed";}