close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

So I'm getting the following error after I loaded my site to my server, "Error in SQL syntax." I checked with my hosting provider, Hostmonster, and confirmed that they support MYSQLi. I built my php coding off the folowing tutorial, https://www.youtu

Thread began 5/25/2015 10:50 pm by jamel | Last modified 6/02/2015 2:23 am by Ray Borduin | 1007 views | 17 replies |

jamel

So I'm getting the following error after I loaded my site to my server, "Error in SQL syntax." I checked with my hosting provider, Hostmonster, and confirmed that they support MYSQLi. I built my php coding off the folowing tutorial, https://www.youtube.com

The issue seems to only affect the pages that link back to my database on my hosting site. Everything worked correctly when it was in the dreamweaver enviornment using wamp, I did not start having problems until I uploaded the site to the server.

Sign in to reply to this post

jamel

update

So when I remove the MySQLi Recordset on my pages, they come up fine. So it looks like the error is in that portion. I am new to php development and MySQLi. I am using the extension for dreamweaver that I bought a few weeks ago and my primary means of establishing the server behavior is through the webassist GUI for the extension.

Sign in to reply to this post

Ray BorduinWebAssist

It could be issues with the database connection information being different on the live server, or perhaps the tables weren't exported properly.

If you give me FTP access to the server and a link to the url where I can view the page with the error I can debug it more carefully.

Sign in to reply to this post

jamel

See private message.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the database connection is failing. The database server, username, or password must be wrong for the live database.

I have added debug code to line 18 to show the error. You can delete that line once it is resolved.

Sign in to reply to this post

jamel

To which page did you add the code?

Sign in to reply to this post

Ray BorduinWebAssist

userRegistration.php

If you visit the page you will see the error with other information about the connection.

Sign in to reply to this post

jamel

Okay, I see it. I'm wondering how much of that has to do with the fact that the connection is set up to have the "localhost" reference an ip address.

Sign in to reply to this post

Ray BorduinWebAssist

Localhost usually works for most hosting companies. If you visit phpMyAdmin, the correct server name and correct database will be listed on the top of the page (see screen shot)

Don't include the part after the colon, that is the port and not part of the server name.

Sign in to reply to this post

jamel

That worked. I had to use the ip address when I was running it as my test server, but once I changed the localhost from the ip address to the words everything started working just fine.

But I have one more question. For my login page I have it set to successful redirect to account.php, but it seems that when I click on "log out" (connected to server behavior) that if I were to login again it takes me to whatever the last page I was on inside my website. Do you know why this happens? Also, the pages that show when you login should be restricted only to be viewed when you are logged in, but I can put in the URL to the site and access the pages without being logged in.

Thank you for you help, I really appreciate it.

Sign in to reply to this post
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...