I have a problem with $_POST
. I am adding data to my mysql database with this code and it is working.;
if (isset($_POST["d_kayit"])){
$denetci=$dbpdo->prepare("INSERT INTO denetciler(name,pass) VALUES(:name, :pass)");
$denetci->bindParam(":name",$_POST["denad"],PDO::PARAM_STR);
$denetci->bindParam(":pass",$_POST["sif"],PDO::PARAM_STR);
$denetci->execute();
}
But in the same form i want to use $_POST["denad"]
for another insert. It is giving me "Notice: Undefined index: denad in"
error. Sample code that giving error is;
if (isset($_POST["add"]))
{
echo "Person: ".$_POST["denad"];
}
Can you help me please?