How can I post and get a php variable
<p>I used the following php code to get the file extension of an uploaded file:</p>

<pre><code>$ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename.
</code></pre>

<p>But now I want to post this variable to an other php file which saves all the data in a database. </p>

<pre><code>if (isset($_POST["submit"])) {
  $insertSQL = sprintf("INSERT INTO sounds (id, title, artist, category, subcategory, keywords, upload, format, size, download, rating, ip, date) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['id'], "text"),
                       GetSQLValueString($_POST['title'], "text"),
                       GetSQLValueString($_POST['artist'], "text"),
                       GetSQLValueString($_POST['categoryID'], "text"),
                       GetSQLValueString($_POST['subcategoryID'], "text"),
                       GetSQLValueString($_POST['keywords'], "text"),
                       GetSQLValueString($_FILES['upload']['name'], "text"),
                       GetSQLValueString($_FILES['upload']['name'], "text"),
                       GetSQLValueString($_FILES['upload']['size'], "text"),
                       GetSQLValueString($_POST['download'], "text"),
                       GetSQLValueString($_POST['rating'], "text"),
                       GetSQLValueString($_POST['ip'], "text"),
                       GetSQLValueString($_POST['date'], "text"));
</code></pre>

<p>I know it is probably a stupid question. But how can I post and get this variable?</p>
