Topic: Send Contact Details
Hi,
I followed the instructions to add Ajax and PHP to a contact form from here:
https://mdbootstrap.com/components/bootstrap-contact-form/
But I have this error [Object Object] after I press the send button.
Can anyone help with this.
Ps, The server i'm using is my NAS devise .
Dawid Adach pro answered 7 years ago
console.log('Error:', data);and replace data with a variable used for receiving a response from AJAX call. Alternatively, you can try to debug in PHP using
var_dump($var)
Lars7 pro answered 7 years ago
Dawid Adach pro commented 7 years ago
Have you tried used sample files from tutorial itself? Is it also happening with sample code?Tom McMeekin pro commented 7 years ago
Hi Dawid, Yes, I just downloaded the file and got this error [object Object]. TomDawid Adach pro commented 7 years ago
Dear Tom, you've mentioned that you are running this on your NAS - this is probably the reason why it fails. PHP uses mail() function which requires the server to have the following module loaded. Most probably your NAS doesn't support that. Please try to run it on some web hosting.Tom McMeekin pro commented 7 years ago
Hi Dawid, Yes, that is why i mentioned the Server as I thought it had something to do with it. I tried your code on a web server and it works fine. I believe it will work on my QNAP but just haven't figured out how yet. Thanks for your help though. TomFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes