title: Undefined variable: while saving user inputted data in text fields on form submi
body: <p>When error_reporting(E_ALL); is turned on I'm having the following example of notice</p>
  
  <pre><code>Notice:  Undefined variable: name in /home/user/public_html/directory/subdirectory/test.php on line 111
  Notice:  Undefined variable: identity in /home/user/public_html/directory/subdirectory/test.php on line 116
  </code></pre>
  
  <p>in every form field if I want to save user inputted data in text fields using session after the form is submitted by the users.</p>
  
  <p>Example of my current code is as following:</p>
  
  <pre><code>GetSQLValueString($_POST['name'], "text"),
  GetSQLValueString($_POST['identity'], "text")
  
    &lt;?php  $_SESSION['form'] = $_POST; ?&gt;
  
    &lt;form action="&lt;?php echo $editFormAction; ?&gt;" method="post" name="userform" id="userform"&gt;
    &lt;input name="name" type="text" id="name" value="&lt;php$_SESSION['form']['name'] = '';?&gt;&lt;php $_SESSION['form']['name']; ?&gt;" size="25" /&gt;
    &lt;input name="identity" type="text" id="identity" value="&lt;php$_SESSION['form']['identity'] = '';?&gt;&lt;php $_SESSION['form']['identity']; ?&gt;" size="25" /&gt;
  
  and so on.............
  </code></pre>
  
  <p>I gout suggestion about eliminating undefined index using </p>
  
  <pre><code>&lt;php$_SESSION['form']['name'] = '';?&gt;
  </code></pre>
  
  <p>as value of text field like,</p>
  
  <pre><code> &lt;input name="name" type="text" id="name" value="&lt;php$_SESSION['form']['name'] = '';?&gt;&lt;php $_SESSION['form']['name']; ?&gt;" size="25" /&gt;
  </code></pre>
  
  <p>The above code resolves undefined index notice but produces undefined variable  notice.</p>
  
  <p>The form works well when error reporting is off.</p>
  
  <p>Any idea, how to define the undefined variable in this case?</p>