خرید بک لینک
My function to update a mysql table is like this
PHP Code:

function UpdateTable()
{
echo 
"1";// So I know the function is being called.
//initiate vars
$field1 "";//repeat for each field
echo "2";
//assign values to vars
if(isset($_POST['field1']))
{
$field1 $_POST['field1'];
//or
$field1 serialize($_POST['field1'];//if an array
}
//repeat for each field
echo "3";
$sql "UPDATE table 
                        SET Field1 = :Field1,
                            Field2 = :Field2,
                            Field3= :Field3
                        WHERE Email = :Email"
;
echo 
"4";
$registered $this->link->prepare($sql);
echo 
"5";
if(
$registered->execute(array(':Field1' => $field1':Field2' => $field2':Field3' => $field3':Email' => $email)))
{
echo 
"6";


When I submit the form, it displays 12345 but not 6, and no errors or warnings,notices. How do I figure out why the execute statement isn't executing if no errors or warnings are generated? The coection works, I've already inserted email into the table.

برچسب: نویسنده: آیلین رضوانی تاريخ: جمعه 15 دی 1396 ساعت: 0:26

صفحه بندی