Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5721 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi,

I am trying to add an upload field to my website so people can upload files. For some reason it is not upload into the container on filemaker database. Any help will be appreciated. Thank you in advance.

Here is what I have now:

form.php












upload.php



$create = new FX("129.0.0.1","80");                   

$create->SetDBData("upload.fp7", "Form"); 

$create->SetDBPassword('','Admin');

$create->AddDBParam('file1',$_POST[file1]);

$createResult=$create->FMNew();

?>

  • Newbies
Posted (edited)

The ODBC is on. But the only problem I am having is to post the file into the database field(container) which is not doing. Any idea what step I need to take in order to go into the field. Any help will be appreciated and thanks in advance.

upload.php


$create = new FX("129.0.0.1","80");                   

$create->SetDBData("upload.fp7", "Form"); 

$create->SetDBPassword('','Admin');



$target_path = "uploads/";

$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 



if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {

    echo "The file ".  basename( $_FILES['uploadedfile']['name']). 

    " has been uploaded";

} else{

    echo "Please try again!";

}



$create->AddDBParam('uploadedfile',$_POST[uploadedfile]);

$create->AddDBParam('Name',$_POST[Name]);

$createResult=$create->FMNew();

?>

Edited by Guest
  • 2 months later...

This topic is 5721 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.