Wordpress template with an insert record form. why isnt working?
Wordpress template with an insert record form. why isnt working?
I think the path for the webassist folder is wrong but I don't get a php error.
Wordpress template with an insert record form. why isnt working?
I think the path for the webassist folder is wrong but I don't get a php error.
Your form elements don't have a name attribute. That is required. Set the name of the form elements to be the same as the id for each. Then try changing the trigger for the insert in the server behavior to use the button press event.
Hi Ray,
I don't understand your instructions.
Can you please break it down for me?
If you can correct the code on the private message, I will be able to see what you mean.
Thanks
Change this:
<input type="submit" value="Submit">
to:
<input name="submit" type="submit" value="Submit">
and change this:
if (($_SERVER["REQUEST_METHOD"] === "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) {
to:
if (isset($_POST["submit"])) {
I updated the code and still the same error.
When testing the page directly it works.
When I include this php page in my wordpress template, and when I submit, it shows error 404 page can't be found. the new record hasn't been added into the db.
Any other ideas please on how to fix this issue?
looking forward to your reply.
I can provide you with an ftp so you can see the files on the server.
If you give me FTP access and let me know which folder to look at for the file then I can try debugging more.
I updated the queryobj.php file to add an attribute:
$this->JavascriptRedirect = true;
This will make it use a javascript redirect instead of a php redirect.
Since you have your code added in the middle of html, it can't redirect using php. The javascript redirect option appears to have resolved this issue.
Tried but no soccess.
I still receiving the error
I think wordpress is using the form element name "name" somewhere else in the code. I renamed a few of your form elements to avoid common names and it appears to be working now. Just download the latest version of the form page I've uploaded.
I renamed a few of them in my hunt, but I think the "name" one was the culprit.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.