title: Argument 1 passed to myFunction() must be an instance of string, string given, called in
body: <p>i have this function:</p>
  
  <pre><code>function myFunction(string $name) {
      $db = mysql_connect("localhost", "root", "");
      mysql_select_db(...); 
  
      $insertplayer="INSERT INTO `...`(....)
      VALUES (......')";
      if (!mysql_query($insertplayer,$db))
        {
        die('Error: ' . mysql_error());
        }
      $id = mysql_insert_id();
      echo 'done for player N°'.$id;
      mysql_close($db);
  }
  </code></pre>
  
  <p>and the form i use:</p>
  
  <pre><code>&lt;form action="insertplayer.php" method="post"&gt;
      &lt;input type="text" name="nameplayer" /&gt;
      &lt;input type="submit" value="ok" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But when i do this, i have this error:</p>
  
  <pre><code>Catchable fatal error: Argument 1 passed to myFunction() must be an instance of string, string given, called in C:.... on line 23 and defined in C:...
  </code></pre>
  
  <p>I have this error with the int problem. How can i resolved it ?</p>