close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PHP webpage with MySQLi recordset does not display - at all!

Thread began 7/09/2015 11:02 am by randyrie405335 | Last modified 7/16/2015 1:44 pm by Ray Borduin | 2706 views | 9 replies |

randyrie405335

PHP webpage with MySQLi recordset does not display - at all!

AGAIN! I'm trying to build a PHP page that is to insert data into a MYSQL dB but the page does not display in a browser. I've added a "display error" script to the page top but even this does not display any errors. I'm attaching the page and sure could use some help trying to figure out what now is wrong.

Sign in to reply to this post

Ray BorduinWebAssist

Are you sure you have uploaded the two files required at the top of the page? If those have been uploaded I may need to get FTP access to fully debug the page. It doesn't appear to be a code problem on this page itself.

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

randyrie405335

The page "automagically" began working this morning - and I haven't touched or changed ANYTHING!! But now I am trying to move on and complete its build by adding an Insert Record behavior. However, I am now getting a generic error "There is an error in your SQL syntax." I cannot locate where that error is -- could you please take a peek at the page and see if you can locate where I've goofed it up? When I remove the Insert Record code, the page opens fine, but when the code is re-inserted via the Webassist GUI, I get the generic SQL syntax error. Webassist's GUIs do not display any errors or hint of anything wrong.

Sign in to reply to this post

Ray BorduinWebAssist

You probably uploaded the necessary include files and that is why it started working. That sounded like the cause of the issue in the first place, so if you uploaded again and clicked "yes" to include dependent files it would have appeared to automagically work without updating anything.

Can you give me FTP access to the page? I can use that to debug. It could be reserved words as column names, or leaving a blank field value in a column that doesn't allow nulls.

I think there is a setting you can update in the include file to set debug=true and that would give you the full error message, but I'd gladly help you debug if you give me FTP access.

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

randyrie405335

I've changed suspect column titles to avoid any reserved word conflicts and I've modified the " $this->Debug = true;" line in the mysqli/queryobj.php file which now gives a more expanded error:

INSERT INTO opp_workassign (Submit Date, Name, Username, Email, Phone, Building, Floor, Room, Category, Urg_Norm, Description) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Date, Name, Username, Email, Phone, Building, Floor, Room, Category, Urg_Norm, D' at line 1

Any ideas what is causing the error?

UPDATE: I just removed all of the MySQLi behaviors and replaced them with the DW CS6 legacy behaviors - and everything worked perfectly - 1st try. I re-applied the MySQLi behaviors and the SQL syntax error returned. So it is something involving the MySQLi extension that is causing my grief. Does this update give you any clues?? I really need to resolve this since this page is expected to be placed into production tomorrow.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it is an issue with spaces in column names. We will have to do an update to the extension to allow for that. For now, I think it would work if you just update the column "Submit Date" to "Submit_Date" in the database.

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

randyrie405335

Thanks Ray. I'll try your suggestion when I return to my office and will let you know how I fare. BTW, I really appreciate your quick responses to my issues. I'm mostly working under tight deadlines (who isn't?) and often need trouble-shooting resolution quickly -- so you're a much appreciated life saver in my case.

2015-07-16: WOW! I would have never spotted that. I got rid of the space in Submit Date and the insert now works. Thanks for your sharp eye.

Sign in to reply to this post

Ray BorduinWebAssist

The email code appears to be applied correctly and should work. What hosting company are you using? Email won't work from your localhost, because XAMPP, MAMP, and WAMP don't include an SMTP server which is necessary to send email from a web page. It may work live if you have only been doing local testing.

If you are testing live, then it may be an issue with the smtp server settings in the email. If you let me know the hosting company I can try to look up the correct settings.

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

randyrie405335

OK. I started all over from scratch using the legacy DWCS6 server behaviors: I built the form with dynamically-fed dropdowns, added an insert behavior, added a PHP mail function (took all of ten minutes) and EVERYTHING works perfectly, including the email (so smtp is working on our server - - it is not being hosted outside of our Firewall.)

Sign in to reply to this post

Ray BorduinWebAssist

I'm sorry for your frustration. Whether the email works or not has nothing to do with the MySQLi code or insert. It has everything to do with the difference in the email code.

If you provide FTP information I can debug the first page and let you know why the email didn't send. It is hard to tell by just looking through the code, but if I'm able to investigate I'm sure I can figure it out.

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