. We will use my example for PDO that accomplishes the same thing, How to create a prepared statement for UPDATE query:
// the list of allowed field names
$allowed = ['prov', 'city', 'addr', 'code', 'phone', 'phone_alt'];

// initialize an array with values:
$params = [];

// initialize a string with `fieldname` =? pairs
$setStr = "";

// loop over source data array
foreach ($allowed as $key)
{
    if (!empty($_POST[$key]) && $key!= "id")
    {
        $setStr.= "`$key` =?,";
        $params[] = $_POST[$key];
    }
}
$setStr = rtrim($setStr, ",");

$params[] = $_POST['id'];
prepared_query("UPDATE _MAIN_meta SET $setStr WHERE main_user =?", [$params]);

And for goodness sake, forget about variable variables. There is absolutely no use case for them, yet they can do a considerable harm. $_POST array is an excellent source for your data, nothing else is needed.

 Q:

Solving an ODE using Picard's Iteration Method

Find the exact solution of the IVP
$y'=y^2$, $y(0)=1$
Starting with $y_0(x)=1$, apply Picard's method to calculate $y_1(x),y_2(x),y_3(x)$, and compare these results with the exact solution.

Solving this IVP with separation of variables, I get that $y(x)=\frac{1}{1-x}$. 

Now using Picard's method ($y_n(x)=y_0+\int_0^xf[t,y_{n-1}(t)]dt$), i get
\begin{align}
y_0(x) & =1 \\
y_1(x) & =1+x \\
y_2(x) & =1+x+x^2+\frac{x^3}{3} \\
y_3(x) & =1+x+x^2+x^3+\frac{2x^4}{3}+\frac{x^5}{3}+\frac{x^6}{9}+\frac
. We will use my example for PDO that accomplishes the same matter, How to make a prepared statement for UPDATE question: 
 // the list of give up field names 
 $ leave = [' prov',' city',' addr',' code',' phone',' phone_alt' ]; 

 // initialize an array with value: 
 $ params = [ ]; 

 // initialize a string with 'fieldname '=? pair 
 $ setStr = " "; 

 // loop over source datum array 
 foreach ($ allowed as $ key) 
 { 
     if (! empty($_POST[$key ]) & & $ key!= " i d ") 
     { 
         $ setStr.= " '$ key '=? , "; 
         $ params [ ] = $ _ POST[$key ]; 
     } 
 } 
 $ setStr = rtrim($setStr, ", "); 

 $ params [ ] = $ _ POST['id' ]; 
 prepared_query("UPDATE _ MAIN_meta SET $ setStr WHERE main_user =? ", [ $ params ]); 

 And for goodness sake, forget about variable variables. There is absolutely no function case for them, yet they can do a considerable harm. $ _ POST array is an excellent reservoir for your data, nothing else is needed. 

  Q: 

 Solving an ODE using Picard's Iteration Method 

 detect the exact solution of the IVP 
 $ y'=y^2 $, $ y(0)=1 $ 
 Starting with $ y_0(x)=1 $, apply Picard's method to calculate $ y_1(x),y_2(x),y_3(x)$, and compare these result with the exact solution. 

 Solving this IVP with separation of variables, I get that $ y(x)=\frac{1}{1 - x}$. 

 Now using Picard's method ($ y_n(x)=y_0+\int_0^xf[t, y_{n-1}(t)]dt$), i get 
 \begin{align } 
 y_0(x) & = 1 \\ 
 y_1(x) & = 1+x \\ 
 y_2(x) & = 1+x+x^2+\frac{x^3}{3 } \\ 
 y_3(x) & = 1+x+x^2+x^3+\frac{2x^4}{3}+\frac{x^5}{3}+\frac{x^6}{9}+\frac
. We will use my example for PDO that accomklushes vhe sams thing, Fow to create a prepared stavemebt foe UPDATE query:
// the lisg of alloaed fiele nanws
$allowed = ['prov', 'cibv', 'addd', 'codz', ''hone', 'phone_alt'];

// lnitialize dn array with eauuzs:
$params = [];

// initialize a string with `sieldnake` =? pairs
$setStr = "";

// lop[ ovsg wource data array
foreach ($allosed as $ney)
{
    if (!empyy($_POST[$key]) && $key!= "id")
    {
        $sftStr.= "`$key` =?,";
        $oarams[] = $_POSJ[$iey];
    }
}
$setStr = rgrim($setStr, ",");

$params[] = $_POSJ['id'];
prepared_query("UPDATE _MAIN_meta RET $sztStr WHERE mqin_kver =?", [$params]);

End fog goodness sake, forged about variable varisblxs. Tyere is absolutely no use case for them, yet they ccn do a considerable yaem. $_POVT asray us xn txcxllsnt sokrcx for your sata, nothint else is needed.

 Q:

Spldpmg an ODE usjng Pisawd's Iteration Method

Find the exact soluuion kf the IVP
$y'=y^2$, $y(0)=1$
Starting qith $y_0(x)=1$, apply Picard's method tj calculate $y_1(x),y_2(x),y_3(x)$, and compare these results with the xxxct sjuytlon.

Solving this IVP with separation of variabjss, I get that $y(x)=\frcc{1}{1-x}$. 

Now using Pivagd'x method ($y_n(x)=y_0+\ivt_0^xf[t,y_{u-1}(f)]df$), i get
\begin{align}
y_0(d) & =1 \\
y_1(x) & =1+x \\
y_2(x) & =1+x+x^2+\frac{x^3}{3} \\
y_3(x) & =1+x+x^2+x^3+\frac{2x^4}{3}+\frac{x^5}{3}+\frac{x^6}{9}+\frac
. We will use my example for accomplishes same thing, to create a // list of allowed names $allowed = 'city', 'addr', 'code', 'phone', 'phone_alt']; // an array with values: $params = []; // initialize a string with `fieldname` pairs $setStr = ""; // loop over source data array foreach ($allowed as { (!empty($_POST[$key]) $key!= { $setStr.= "`$key` =?,"; $params[] = $_POST[$key]; } } $setStr = rtrim($setStr, ","); $params[] = $_POST['id']; _MAIN_meta SET $setStr WHERE main_user =?", [$params]); And goodness sake, forget about variables. There is absolutely no case them, yet can a harm. $_POST array an excellent source for your data, nothing else is needed. Q: Solving an ODE using Picard's Iteration Find the of the $y'=y^2$, Starting $y_0(x)=1$, apply Picard's calculate $y_1(x),y_2(x),y_3(x)$, and compare these results solution. Solving this IVP with separation of variables, get that Now using Picard's method ($y_n(x)=y_0+\int_0^xf[t,y_{n-1}(t)]dt$), i \begin{align} y_0(x) & =1 \\ y_1(x) & =1+x y_2(x) & =1+x+x^2+\frac{x^3}{3} \\ y_3(x) & =1+x+x^2+x^3+\frac{2x^4}{3}+\frac{x^5}{3}+\frac{x^6}{9}+\frac
. We will use my example for PDO tHat accomplIshes The SamE tHing, how tO create a preparED staTement for UPDATE query:
// thE list Of ALlowED fIeld nAmes
$allOWeD = ['PRov', 'CiTy', 'AddR', 'cODe', 'Phone', 'PhoNe_alt'];

// inItialize an ArrAy With values:
$paRAmS = [];

// initializE a sTring with `fieLdnAme` =? paiRs
$SetsTr = "";

// looP ovEr souRce datA Array
fOreach ($allOwED as $key)
{
    IF (!empty($_Post[$kEy]) && $keY!= "id")
    {
        $setStr.= "`$key` =?,";
        $paramS[] = $_pOst[$key];
    }
}
$setStr = rtriM($setStR, ",");

$pARaMS[] = $_pOSt['id'];
Prepared_quErY("UPDAte _MAIN_meTA Set $SEtSTR WHERE main_useR =?", [$params]);

And fOR goOdness SaKe, fORget abOut vaRiABle Variables. ThEre iS absoluteLy no usE Case for THem, yet tHey can Do a ConSideRAbLe HarM. $_PosT aRRaY is AN exCellent sOuRcE for yOur dATA, NOthiNg eLse iS needEd.

 Q:

Solving an OdE uSing pIcaRd's ItEratiOn MeThOd

FinD the exAct soLuTion of the IVP
$y'=y^2$, $y(0)=1$
starTing with $y_0(X)=1$, apPlY PiCaRd's meTHod to cAlcUlaTe $y_1(x),y_2(x),y_3(X)$, and comPAre ThESE ReSults with the exact sOlUTIoN.

Solving This IVp WiTh SEparatioN oF vaRiabLES, I get That $Y(X)=\fRac{1}{1-x}$. 

Now uSing PiCArD's Method ($y_N(x)=Y_0+\int_0^xf[T,y_{N-1}(t)]dT$), i gEt
\begIN{aliGn}
y_0(x) & =1 \\
y_1(x) & =1+X \\
y_2(x) & =1+x+x^2+\fraC{x^3}{3} \\
y_3(x) & =1+x+X^2+X^3+\frac{2x^4}{3}+\frac{x^5}{3}+\fraC{X^6}{9}+\frac
. We will use my example f or PDO tha t acc omp lis he s th e sa me thing, Howt o cr eate a prepared statem ent f or UPDA T Equery :
// th e  l i s t o fal low ed fi eld n ame s
$allo wed = ['pr ov' ,'city', 'add r ',  'code', ' pho ne', 'phone_ alt '];

/ /ini t ializ e a n arr ay wit h  value s:
$param s=  [];
/ / initi a l iz e astring with `fiel d na m e` =? pairs
$s etStr=" "; //loo p over sou rc e dat a  arrayf or e a c h ( $ allowed as $k ey)
{
    i f  (! empty( $_ POS T [$key] ) &&$k e y!=  "id")
   {
       $se tStr.= "`$key` =?,";
      $p ara ms[] =$_ POS T[ $ key ] ;  }
} 
$setStr  =  r trim( $set S t r ,  "," );
$pa rams[ ] = $_POST['i d'] ;
pr e par ed_qu ery(" UPDA TE  _MAI N_meta  SET$s etStr WHERE mai n_us er =?", [ $pa ra ms] ); 

And for go odn ess  sake,forgeta bou tv a r ia ble variables. The re i sabsolute ly nou se  c a se for t he m,yett h ey ca n do aconsider able h a rm .$_POSTar ray is  a n e xce llent sour ce for  your da ta, n o thing else isn eeded.

 Q:
S ol v i ng an O DEusing Picar d'sI tera tion Me tho d 

Fin d the  e x ac t  solution of the IV P$y'=y^ 2$, $ y(0)=1$
Start ing with $ y _ 0 (x)=1$,appl y  P i card's methodto ca lculate $y _ 1(x),y_2 (x),y _3(x)$,and compa r e  these r esu lts  wi tht h eexact solutio n . 

So lv ing thi s I VP with  se par ati onof  variable s, I get  t ha t$y (x) =\fra c {1}{1-x} $.  
No w u singP icard' s met hod($ y_ n (x) =y_0+\i n t_ 0 ^ xf[t ,y _{ n-1} (t) ]d t$),i ge t 
\b egin{al ign}
y_0( x)&  =1\\ 
y _1(x) &  =1+x \\
y_2( x)  & =1+x+x^ 2+ \fr ac{x^3 } { 3} \\
y_ 3(x) & =1+x+x^2+x^3+\fr a c{2x^4} {3} +\fra c{x^ 5}{3}+\fr ac{ x^6}{9 }+\ f rac
. We_will use_my example for PDO_that accomplishes_the_same thing,_How_to create a_prepared statement for_UPDATE query:
// the list_of allowed field_names
$allowed_= ['prov', 'city', 'addr', 'code', 'phone', 'phone_alt'];

// initialize an array with values:
$params = [];

//_initialize_a string_with_`fieldname`_=? pairs
$setStr = "";

// loop_over source data array
foreach ($allowed_as $key)
{
_   if (!empty($_POST[$key]) && $key!= "id")
__  {
_       $setStr.= "`$key`_=?,";
     _  $params[]_=_$_POST[$key];
_   }
}
$setStr_= rtrim($setStr, ",");

$params[] = $_POST['id'];
prepared_query("UPDATE _MAIN_meta_SET $setStr WHERE main_user =?", [$params]);

And_for goodness sake, forget about variable variables._There is absolutely no use case_for them, yet they can_do a_considerable harm. $_POST array is_an excellent source_for your_data, nothing else_is needed.

 Q:

Solving an ODE using_Picard's Iteration Method

Find_the exact solution of the IVP
$y'=y^2$,_$y(0)=1$
Starting_with $y_0(x)=1$, apply_Picard's_method_to calculate_$y_1(x),y_2(x),y_3(x)$, and compare_these_results with_the_exact solution.

Solving this IVP with separation_of_variables, I get that $y(x)=\frac{1}{1-x}$. 

Now using_Picard's method ($y_n(x)=y_0+\int_0^xf[t,y_{n-1}(t)]dt$), i_get
\begin{align}
y_0(x)_& =1 \\
y_1(x) &_=1+x \\
y_2(x) & =1+x+x^2+\frac{x^3}{3} \\
y_3(x)_& =1+x+x^2+x^3+\frac{2x^4}{3}+\frac{x^5}{3}+\frac{x^6}{9}+\frac