close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySqli Insert Record not working

Thread began 7/01/2021 1:23 pm by birdscreen398247 | Last modified 9/26/2022 10:19 am by Ray Borduin | 416 views | 14 replies |

birdscreen398247

MySqli Insert Record not working

I created a page to insert a new record in my database using MySqli/data Management/Insert Record.
I chose "Submit on this form"
There are no validations to deal with, just plain entries.
When I click Submit, it blanks the form, does not insert the record, nor go to the $InsertGoTo page
See attached file.

Sign in to reply to this post

Ray BorduinWebAssist

Your insert runs on form post, but your form method is type get.

I'd add mehod="post" to your form tag and then find replace $_GET for $_POST in your code and that should fix it.

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

DeanCollins

I'm also having a problem with the mysqli insert record. II'm testing this on one form field only (Site Name). I've used the form field in the column bindings tab. Nothing is required in the current form. I've attached the page.

Attached Files
forms_application.php
Sign in to reply to this post

Ray BorduinWebAssist

Your form action is set to: action="forms.php"

But your insert code is on forms_application.php. Your form action has to point to the page with the insert code. You can add a redirect to go to the other page after the insert has completed.

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

DeanCollins

Thanks! Changing the action to forms_application.php fixed part of the problem. A record now inserts, but the record is blank, it doesn't insert anything.

Is there something wrong with my form field?

<label class="form-label mb-0">Name or Description of Site:</label>
<input type="text" class="form-control" name="si_site">

Sign in to reply to this post

Ray BorduinWebAssist

I don't see anything wrong. Please attach the page again and I'll take a look.

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

DeanCollins

It's attached. I've added a couple more bindings so I could test the upload behavior (it doesn't work).

Attached Files
forms_application.php
Sign in to reply to this post

Ray BorduinWebAssist

You have your bindings set up to insert from the recordset instead of insert from the form.

Your file upload should be bound to the "Server File Name" value from the file upload. Also your upload Trigger should be the same as your insert trigger.

I could help you with something like this in a premier support ticket for $100/hr. This would probably only take 10 minutes, but there is a $50 minimum.

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

DeanCollins

Thanks! I thought I'd tried binding to the form. Guess not. So, that works now. However, the upload still doesn't work.I have many "Database > Dataassist Pages" with file uploads. Never had any problem with those.

Anyway, where do I put in a Premier Support ticket?

Sign in to reply to this post

Ray BorduinWebAssist

You can just call the number at the bottom of every page on this website and we can coordinate a time to meet. If you attached the most recent version of the page then I could try to help here as well.

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...