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
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>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.