How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

Finish GUI for Project ---------------------- I need some

Resolved Question:

Finish GUI for Project
I need some help with the AJAX and PHP. Basically, I already have the site in HTML and process.php to call the functions instead of directly to DB. It is involved with insert, update,
 and delete the data. I would like to improve the site by less repeative and more effective.


Submitted: 2 years ago.
Category: Homework
Expert:  TheDoctor replied 2 years ago.
Hello again! Thank you for requesting me.

By when do you need this?
Customer: replied 2 years ago.

Tom morrow morning is alright with you?

Expert:  TheDoctor replied 2 years ago.
Do you have a URL for the site? You have me FTP info, but not the actual URL.
Customer: replied 2 years ago.
Expert:  TheDoctor replied 2 years ago.
And the user name is?
Customer: replied 2 years ago.


Expert:  TheDoctor replied 2 years ago.
What do you need help with?

Pretend that I have no idea what this site is or what it is supposed to do. Provide details that would get me up to speed.
Customer: replied 2 years ago.

The Design Doc will help you understand the purpose of each site and the whole websites.



Expert:  TheDoctor replied 2 years ago.

I am still unsure as to what it is you need. You sent me a project with dozens of PHP files, information for an FTP site, and a name of a database. You didn't send me the actual database so that I could implement it locally, and the site that you sent me to does not appear to work at all. None of the menu items work. Press "back" results in a 404 error. Loan/Add/Delete appears to do nothing.

So far, all you have stated is that you need PHP and AJAX help. To accomplish what? Is there a part of the system you need help on? Or do you need help on the entire system?
Expert:  TheDoctor replied 2 years ago.
Hello again,

One of the folders that you sent me appears to be phpMyAdmin. I don't think that I need any of that.

I've studied the code. I see there are some functions. Though they do not appear to be used. The buttons do not do anything because there they are just buttons with no action or event handling.

You stated earlier "each site", which I assume means each page. Each page right now is an HTML page. It appears that the only functionality that is implemented is the login. There appears to be files that are not relevant to the project. One of the includes appears to be dealing with with e-commerce stuff.

Is Page.class.php actually used anywhere, or Database.class.php? (Or anything in the includes folder).

I believe the reason that I am having confusion is all this extra code, files that are not being used, I have a copy of phpMyAdmin that I am not sure why you sent me. There are a number of functions in LabManager, but they do not appear to be used anywhere. The only functionality implemented is the log in. The rest of the pages are html and have buttons with no event handling, and the data in them is just written into the HTML. Looking at the html mockups, I don't see any area where staff permissions could be managed.

Looking at the database, it doesn't appear to be complete either. There are no tables for resource categories or resources. I'm not certain what the point of the Staff table is. If it just has a reference to the user id and then active or not, then breaking out into a separate table is not correct.

I would new a few days to work on this to try and get it functional and clean up what is already there. Let me know if you do not have that much time.
Customer: replied 2 years ago.

You are right. There are some irrelevant files.

Files are not needed:

includes folder, Page.class.php, Database.class.php and phpmyadmin

(Although I would like to restrict some users from getting the full functionalty by not revealing the portion of menu, maybe that is why I left it there for that reason)


Functionality: What I need help right now with is functionality of buttons that would be able to modify, update and delete. Then we can work for few days.

Database: Would you able to sketch up what the database should look like?


Expert:  TheDoctor replied 2 years ago.
Hello again,

I will contact you once this is complete. At latest, before Sunday morning. Though it may be much sooner.

Thank you
Customer: replied 2 years ago.

Thank you.

Expert:  TheDoctor replied 2 years ago.
You're welcome.
Customer: replied 2 years ago.

I will strongly preferred before Sun. Just let you know...

Expert:  TheDoctor replied 2 years ago.
I will do my best.
Customer: replied 2 years ago.

I want to let you know that I care more about the functionality.

Expert:  TheDoctor replied 2 years ago.
All I am working on is the functionality.
Customer: replied 2 years ago.

What is the status?


Expert:  TheDoctor replied 2 years ago.
The users page is functional. The staff page is almost done.

Then I will do the resources page. Then I will send you the results.
Customer: replied 2 years ago.


Expert:  TheDoctor replied 2 years ago.

Hello again!

You can download the completed files here:

I also uploaded them and updated the database at the site you gave me.

I tested each page and they are working as intended. You can add new users. If you want to log in as a new user, you have to go to the staff page and add them as staff and set them to active (1).

And you can loan out resources or mark them as returned.

I'm sure that there will be a lot of additional work to be completed. As you will see, this functionality required many hundreds of lines of JavaScript and PHP. It may not be a 100% completely project at this point, but at least it now has working functionality.

If you would like to continue working on this together, I would kindly ask that you rate based on the work that is done and then enter a new question to move forward. The level of effort put into this has been high, given the question value. Though I am happy that I was finally able to figure the site out and get something working for you!


If you need the database changes that I made, you can get them from the database server you pointed me to.

Let me know if you have any questions. I'm here to help.

Please remember to rate my answer. Thank you so much!

Customer: replied 2 years ago.

Little modification. I would like to edit the user data with edit button..

Expert:  TheDoctor replied 2 years ago.
That is actually quite a large change. I will contact you when it is complete.
Expert:  TheDoctor replied 2 years ago.
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience: M.S. in Internet Information Systems
TheDoctor and 4 other Homework Specialists are ready to help you
Customer: replied 2 years ago.

Could you help me and fix the name of the user in the following, first name and last name? But right now it is Last name and Middle name. Don't have to fix it. I just need instructions.

Customer: replied 2 years ago.

There is an problem with the login system. It should say invalid user instead of no privilege user

Expert:  TheDoctor replied 2 years ago.
I never touched anything with the log in system. The message "No Privilege User" was in the system that you sent me.

I will take a look at this later tonight. I am currently working on other projects.
Customer: replied 2 years ago.


Expert:  TheDoctor replied 2 years ago.
For the logged in as name,

Go to LabManager, line 136, in the getUserData function.

Most SQL text books tell you to never use SELECT *. Also, in every professional organization I have encountered, there are "coding standards". These standards always state that SELECT * is not permitted. This is because 1.) Your fellow developer cannot see what it is you are selecting without consulting the database. This is a huge waste of time, and 2.) You are leaving the order of the selected columns up to the database rather than specifying a guaranteed order in your code. This is sloppy.

In this case, you are doing a SELECT *, which will only work as long as the database is never altered. If it is altered, then your binding a couple lines later will be wrong. It is very poor form to use SELECT *. It should always be avoided.

If the query had been SELECT FirstName, MiddleName, LastName, etc... You would never run into an issue, and any other developer looking at the code would immediately know what you are selecting. As it is, your binds are in a different order than the columns are in the database. That is why you are getting middle name an last name. You can change the select statement to select the columns in the order that you want them or you can change your bind statement to be in the order of the database, which is:

$id, $lastName, $firstName, $middleName

I would suggest changing the select to actually select specific columns in the order that you want. I promise you that in the real world, this will be a requirement.

For the log in, the code that you sent me has two different messages. One is invalid user. This will show up if you type in a user name that is not found in the database at all. For instance, type in sfkwefklshfekj. You will receive "Invalid User".

Type in the name of a user who has not been added as Staff, but is a user, and you will receive "No Privilege User". This is how the code you sent me works. The log in AJAX is a two-step nested AJAX call. First it sees if there is a user with that user name. If there is not, it gives the invalid user message. If there is, it checks to see if that user is an active staff member. If they are not, you receive the "No Privilege User" message. Otherwise, you are logged in. It appears to be working perfectly as it is designed.
Customer: replied 2 years ago.

Thank you so much. I will contact you if I have any further questions.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

Meet The Experts:

  • Manal Elkhoshkhany

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
< Last | Next >
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
  • LogicPro's Avatar



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • Linda_us's Avatar


    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    Post Graduate Diploma in Management (MBA)
  • Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    Experience with chartered accountancy
  • Bizhelp's Avatar



    Satisfied Customers:

    Bachelors Degree and CPA with Accounting work experience
  • Seanna's Avatar



    Satisfied Customers:

    3,000+ satisfied customers, all topics, A+ work