Find Jobs
Hire Freelancers

Contact Form 7 Form File Upload to FTP Servers Based on Dropdown Selection - 25/05/2017 12:36 EDT - open to bidding

$30-250 USD

Closed
Posted almost 7 years ago

$30-250 USD

Paid on delivery
I have a simple request form setup in Contact Form 7 with a dropdown selection of two facilities. There are two anonymous server addresses to upload files to based on which dropdown facility is selected. I have successfully added the following code to the [login to view URL] file, tested it and it works correctly for one of the dropdown selections. My problem is, I cannot get the code right for the other dropdown selection to upload and work correctly. The setup is the form part goes to a distributed email address and the file gets uploaded to the Anaheim or Orange FTP server. ftp**.[login to view URL] – Orange Facility ftp**.[login to view URL] – Anaheim Facility This only works for the Orange Facility. Now I can't seem to get the logic right for the 2nd code. I tried doing two separate functions (FacilityA and FacilityB) but I am stuck on how to take the "SelectAFacility" name and split it into 2 functions or write a conditional statement. Here is the code for the Contact Form 7: <label> Your Name (required) [text* your-name] </label> <label> Your Email (required) [email* your-email] </label> <label> Company [text your-company] </label> <label> Select A Facility </label> [select SelectAFacility "Anaheim|ftpuploadanaheim(at)[login to view URL] Orange|ftpuploadorange(at)[login to view URL]"] <label>Upload File [file your-file filetypes:pdf|txt|doc|docx|xls|xlsx|ppt|pptx|zip|tar|tgz|rar] </label> [submit "Send"] ______________________________________________________________________________________ Based on the dropdown selection, I tried to add a conditional statement to achieve this but it is not working and I need it done today. Here is the code with the conditional statement: function log_cf7($WPCF7_ContactForm) { $submission = WPCF7_Submission::get_instance(); $data = $submission->get_posted_data(); $uploadedFiles = $submission->uploaded_files(); $location = $data['SelectAFacility']; if (isset($uploadedFiles) && isset($uploadedFiles['your-file'])) { if ($location == 'Anaheim') { $ftp_server = "ftp**.[login to view URL]"; $ftp_username = "username A"; $ftp_userpass = "password B"; } elseif ($location == 'Orange') { $ftp_server = "ftp**.[login to view URL]"; $ftp_username = "username B"; $ftp_userpass = "password B"; } else { // do something exit(); } $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to server"); $login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass); $fileToUpload = $uploadedFiles['your-file']; $remotefile = $_FILES['your-file']['name']; if (ftp_put($ftp_conn, $remotefile, $fileToUpload, FTP_ASCII)) { //echo "Successfully uploaded $remotefile."; } else { // echo "Error uploading $fileToUpload."; } // close connection ftp_close($ftp_conn); } }
Project ID: 14157927

About the project

37 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
37 freelancers are bidding on average $165 USD for this job
User Avatar
Hello bullheadcityweb!. Im a full stack developer, i can help you do this task fast. i have already charged a reasonable price. Please hire me!Thank you!
$180 USD in 5 days
5.0 (852 reviews)
8.4
8.4
User Avatar
I can help can we discuss? are you able to send me the ftp to check this code live in progress? we can work now. thanks
$64 USD in 1 day
4.9 (397 reviews)
8.2
8.2
User Avatar
Ready to do your job now Please give me job, i will give you best and fast work. just give me chance and will approve my work ability.
$147 USD in 3 days
4.9 (522 reviews)
7.9
7.9
User Avatar
Hello. I'm ready to start your project now. Thank you very much .
$222 USD in 5 days
5.0 (107 reviews)
6.6
6.6
User Avatar
According to my understanding you are unable to get value of $data['SelectAFacility'] correctly for applying it under condition. Right?
$77 USD in 1 day
4.9 (20 reviews)
5.7
5.7
User Avatar
Hello, I just took a quick glance at the code, when you try running the version modified for either server, neither works? But when set for just Orange, it works? I should be able to get this working quickly for you, it's a bit late here in the states (little after 1 AM), but I can get started on it first thing tomorrow and have it done in the afternoon. Thanks! Keith
$70 USD in 3 days
4.7 (20 reviews)
5.4
5.4
User Avatar
we have best server setup team
$194 USD in 3 days
4.6 (39 reviews)
4.9
4.9
User Avatar
Hi, I am a serious developer who aims to provide high quality services. If you contact me, we can discuss more things detail and will be achieved with each other's purpose. Good luck for your business…
$155 USD in 2 days
4.9 (12 reviews)
4.4
4.4
User Avatar
Hi,dear. I am a senior software developer. I have just checked your project report, I am able to perform this task with my developer team. I am looking forward to your proposal...
$155 USD in 1 day
5.0 (9 reviews)
3.3
3.3
User Avatar
Hi, Thanks for the code I have reviewed the code and I am ready to fix it . Please let me know when I can Start working? Looking forward to hear from you. Thanks Rohit
$100 USD in 0 day
4.8 (8 reviews)
2.8
2.8
User Avatar
Greetings! My name is Amit Kumar and I am an expert in web development. I would love to have the opportunity to discuss your project with you. I believe my skills are good enough to match your project. I have a good grasp of working with core php, wordpress and framework. From the last 3 and half year i have worked on following modules: Codeigniter CakePHP WordPress WooCommerce Joomla Payment Gateways PHP MySql HTML CSS Javascript jQuery For my work samples please checkout my Portfolio Section I believe communication is the key to any successful project, and I'd like to start things off on the right foot but suggesting we schedule a phone or s k yp e call to discuss the project further. This will enable us to make sure we communicate well and that both parties are completely comfortable with the scope of the project. Please let me know a time that works best for you and I will make sure that I make myself available. Thank you for your time and consideration. Sincerely, Amit Kumar
$150 USD in 3 days
5.0 (5 reviews)
2.8
2.8
User Avatar
I have 4 year experience in PHP and wordpress development . I am capable enough to build php web application with full security and code reusability.
$55 USD in 1 day
5.0 (6 reviews)
2.4
2.4
User Avatar
I am PHP developer. I have 4 years of experience in web development. I have experience in PH PHP,mysql,html,css. looking forward to work with you.
$100 USD in 2 days
5.0 (1 review)
0.4
0.4
User Avatar
Hello there, We have gone through your specified requirement and according to which you want to develop a code for your requirements. We can definitely help you in this task. I think for this development you will be needing a team, so it will be handle properly with care and we can assure you the best quality of work. We have understood your requirements by looking at your provided link and are more confident about completing this task. This seems to be a challenging task which can achieved perfectly and it's our forte to work on high requirements, as we've all kind of service and we never miss an opportunity to grab it. We can work on all your requirements and commit our word that your final product will be the same as you're expecting to be. Please send me a scope of work document, so we can see all your particular or extra features and it would be great if discuss all your requirements end to end. Please care to discuss more via chat, so we will be on the same wavelength. Hope to hear soon and would like to work with you, Hope will get a chance to serve our great services. Kind Regards, Zeefalls Techsolutions
$222 USD in 15 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hello Sir, We have gone through the details you have provided and we have already worked on a similar project before and can deliver as u have mentioned and would be pleased to work on this with you to deliver the results that you have expected and we have already worked on a similar project before and can deliver as u have mentioned We are sure you will not be disappointed if you give us this opportunity. Our team is experienced, creative & efficient enough to get your job done well. We have an impeccable record and all our clients enjoy working with us, we are sure that you will too, our prices are cheapest in market. can u provide your email or sky-pe etc for further discussion about the project I am ready to discuss with you with best Regards
$207 USD in 6 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Bullhead City, United States
5.0
6
Payment method verified
Member since Jan 29, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.