mysql - PHP PDO Internal Server Error -


i trying insert table using pdos (mysql)

connect file:

try {  $con = new pdo('mysql:host=sadf;dbname=sadf','sadfsdaf1','asdfsdaf'); $con -> setattribute(pdo::attr_errmode, pdo::errmode_exception);  } catch(pdoexception $e) { echo("<h2>error: unable connect database </h2>"); echo $e->getmessage();  //insert errors database } 

code:

$sql = "insert domains (team_id,domain_id,name,description,date,user_id) values (:team,'',:name,:desc,now(),:user)"; $query = $con->prepare($sql); $query->bindparam(':team', $team_id); $query->bindparam(':name', $name); $query->bindparam(':desc', $description); $query->bindparam(':user', $user_id); $query->execute(); 

i keep getting error , rest of page doesn't load. internal server error.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -