close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Wordpress template with an insert record form. why isnt working?

Thread began 12/22/2019 3:41 pm by Gizza372666 | Last modified 12/30/2019 5:03 pm by Ray Borduin | 88 views | 13 replies |

Gizza372666

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.

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Gizza372666

Not sure what I need to do

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

Sign in to reply to this post

Ray BorduinWebAssist

Change this:

<input type="submit" value="Submit">


to:

<input name="submit" type="submit" value="Submit">



and change this:

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

php:
if (isset($_POST["submit"])) {
Sign in to reply to this post
Did this help? Tips are appreciated...

Gizza372666

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.

Sign in to reply to this post

Ray BorduinWebAssist

If you give me FTP access and let me know which folder to look at for the file then I can try debugging more.

Sign in to reply to this post
Did this help? Tips are appreciated...

Gizza372666

ftp deatails sent

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

Gizza372666

Tried but no soccess.
I still receiving the error

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...