Jump to content

[SOLVED] uploading problem


corillo181

Recommended Posts

i had a upload script that was working fine, i havent used it for some time but today i try to test it but i'm not getting anything back from the tmp file

 

<?php
$tmpPath = $_FILES['fileMusic']['tmp_name'];
$fileName= $_FILES['fileMusic']['name'];
$filetype = $_FILES['fileMusic']['type'];
$newName = $_POST['sname'];
$genre_id = $_POST['genre'];
$artist_id = $_POST['artist'];

echo $tmpPath.'<br />';// returns empty - not working
echo $fileName.'<br />';// returns the file name - works
echo $filetype.'<br />';// returns empty - not working
echo $newName.'<br />';// returns desire name - works
echo $genre_id .'<br />';// returns chosen id -works
echo $artist_id.'<br />';//returns chosen id - works
?>

Link to comment
https://forums.phpfreaks.com/topic/81756-solved-uploading-problem/
Share on other sites

my form

<form action="" method="post" enctype="multipart/form-data" name="form1">
  <table width="100%" border="1">
    <tr>
      <td>artist</td>
      <td><label>
        <select name="artist" id="artist">
<?=$search->artistNames()?>
        </select>
      </label></td>
    </tr>
    <tr>
      <td>genre</td>
      <td><select name="genre" id="genre">
<?=$search->genre()?>
        </select></td>
    </tr>
    <tr>
      <td>song name</td>
      <td><label>
        <input type="text" name="sname" id="sname">
      </label></td>
    </tr>
    <tr>
      <td>song file</td>
      <td><label>
        <input type="file" name="fileMusic" id="fileMusic">
      </label></td>
    </tr>
    <tr>
      <td><input name="addsong" type="hidden" id="addsong" value="true" /></td>
      <td><button type="submit" name="submit" id="submit">Upload</button></td>
    </tr>
  </table>
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.