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

**For the Doctor** question in Security and finih up the apartment

This answer was rated:

**For the Doctor** question in Security and finih up the apartment project
Hello again! Thank you for requesting me.

I am not sure if I can answer your security question or not. I will let you know once I see it.

I absolutely can finish up the apartment project for you.

Please upload whatever you have to

Them provide me with the link. Thank you.
Customer: replied 4 years ago.


The security is pretty simple I almost finish it. All what I need are the missing codes, you will see. It wil take you maybe 5 minutes.

Thank you,

I will contact you once this is complete.
Hello again,

A lot of what you highlighted is actually already completed. There simply needs to be more of it. And you certainly do not need to enter real addresses. You're professor will not see anything you enter anyway.

What your professor meant is that you did not send him the alter statements that I sent you. You should have sent those to him. Because you didn't, the database he has will not work with the site.

What he is asking is that you send, in a text file, all of the SQL necessary to create the current database that functions with the site. I will send you that text file. You would just zip it up along with your site when you submit everything to your professor. He can then use the text file to recreate your database and test your project.

I will contact you once all of these changes are complete.

Thank you
Hello again!

You can download the security lab here:

And you can download the apartment project here:

In the apartment project, I included the text file that you need to send your instructor. It is called database.txt

This is what he wants. He wants your current database so that he can test your project.

I included screen shots of each item functioning, as your instructor requested.

Now, when you test the email functionality, you should know that you cannot simply test it. WAMP or XAMPP will not allow you to test emails without something to actually catch those emails. Emails are sent to an SMTP server for processing. You do not have an SMTP server running on your computer.

So what you willl do is go here and download the email test tool. After downloading it, install it. After installing it, run it. Do not change any settings. Just let it run in the background.

Now, when PHP triggers an email, the email test tool will intercept it and open it up in your system's default mail program. That way, you will actually be able to test the email functionality. Without this tool, PHP attempts to send an email to port 25 on your computer, which is a closed port, and the message dies. On a web server, there would be an SMTP server already set up.

I did not change the view pages because I did not see a reason to change them and because your instructor suggests that any changes from previous versions will make him unreasonably irritated. Honestly, if he were my professor, I would be filing a complaint with the school. "If you don't name your file correctly you get a 0", "If you change from previous versions and don't provide a reason that I find good enough, you get an F". It seems his instructions are more about his ego than about teaching you anything.

In any case, the email functionality and the search functionality is what is new in these requirements and they have both been implemented successfully.

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 4 years ago.

I am getting this error when I click on view offers an requests. It looks like something is not linking.

Warning: mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it. in X:\xampp\htdocs\ProjectFinal_atlanta\Database.class.php on line 11

No connection could be made because the target machine actively refused it.

Hello again,

That is not an error in my code. It is an error in your environment. It means either that you do not currently have MySQL running, you have internet security software running that is blocking the connection to MySQL, or the connection data for the database is not correct for your system.

As I have mentioned in the past, you must open up Database.class.php and look at the connection variables at the top. If they do not match your system, you need to change them. They are currently set to localhost, root, no password, and a database called mlopez.

From that particular error, it looks like MySQL is not currently running on your computer. Localhost is actively refusing the connection, which means that it is not listening on that port. That would seem to indicate that MySQL is not running.

This has absolutely nothing to do with my code.
TheDoctor and 2 other Homework Specialists are ready to help you
Customer: replied 4 years ago.

Yeah mysql was not running. But, I am getting another error. I fixed the password XXXXX I did the last time. If I open the file from last week and it runs just perfect but if I try one that we just did I am getting this error. I also tried logout and login and get the same thing. What do you think is the problem? The system is connected to appache, mysql and cmd is opened and working



Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) in X:\xampp\htdocs\ProjectFinal_atlanta\Database.class.php on line 11

Access denied for user 'root'@'localhost' (using password: NO)

You may think that you fixed the password XXXXX the file, but you did not. Open up Database.class.php. Make certain that it is the new copy of Database.class.php that you have open.

Look at the error message. It states that there is no password. So you either did not save the changes to the file or you did not make the change correctly. It is attempting to connect with "root" and no password. Make certain that you update that variable and that you save your changes, and that you have the correct copy of the file open.

PHP does not lie. If it says that there is no password (which is what that error is saying), then there is no password. You didn't successfully update that file. Make the changes, then go back to your browser and press CTRL-F5.

Customer: replied 4 years ago.

Thanks I reset the system again and it works. Now I going to deal with the email part. Thanks for your patience. I just rate you, make sure you get your money and let me know if I owe you something else. Your knowledge is extremely valuable.

Hello again,

Yes, I received you rating. Thank you for your generosity. It is greatly appreciated.

While testing the email, if you do not run the test email program, you will likely get a large error. This is because the mail function will fail. You must be running the test email program first.
Customer: replied 4 years ago.

I think we have a SMTP server set up and is giving this error. I tried the program that you gave me but I do not know I did not get anything probably is because of this set up.


Warning: mail(): Failed to connect to mailserver at "" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in X:\xampp\htdocs\ProjectFinal_atlanta\Notifications.class.php on line 45

THIS IS PART OF php.ini that I think has to do with the error.

[mail function]

; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury


smtp_port = 25

; For Win32 only.


sendmail_from [email protected]

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program files\xampp) fakemail and mailtodisk do not work correctly.

; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.

; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)

;sendmail_path = "\"\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the \xampp\mailoutput folder

;sendmail_path = "\xampp\mailtodisk\mailtodisk.exe"

; Force the addition of the specified parameters to be passed as extra parameters

; to the sendmail binary. These parameters will always replace the value of

; the 5th parameter to mail(), even in safe mode.

;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename

mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers

;mail.log = "\xampp\php\logs\php_mail.log"

That error is exactly what I was telling you would come up.

If you are running XAMPP on localhost you do not have an SMTP server running. XAMPP does not come with an SMTP server. That is a completely different set of server software that you would need to install on your local computer. However, you really do not want to do that.

You need to download, install, and run the program that I gave you a link to. It listens to port 25 on your computer (port 25 is the SMTP port). It intercepts messages and then displays them to you.

It does not matter if your class has an SMTP server installed. They probably do. You would not change anything with any of the code. To test the code on your local computer, you must be running software on your computer that is listening to port 25. The link I gave you is exactly such software.

If you do not install the software that I pointed you to, you will always get this error when running locally. You will not get the error once you upload to a server because a server likely already has an SMTP server running.

Pleas do not go changing any php.ini settings. You do not need to and you will likely just break this. There is nothing that you need to change. It is working exactly as it is supposed to. You do not have an SMTP server on your computer. You need to run the software that I pointed you to. It is a completely different protocol than is provided with either XAMPP or WAMP.

By the way, PHP will automatically use the default SMTP server for the server you are running on if you make absolutely no change to php.ini

So if you touched nothing and uploaded this to your school's server, it would work. Or if you touched nothing and ran the software I gave you, it would work.


You are not going to be able to change your school's ini file, so why alter ini settings now? Were you directed to do so? It seems to be way out of scope for the project. Unless you received that address from your course and were explicitly instructed to alter your php.ini file, you should not be doing it. I tested that address, and it is not accepting connections. So it would seem like you weren't instructed to do this.


If you put the ini file back to default and use the test software, it would work.


Customer: replied 4 years ago.

In a previous lab work the professor made us to change a the php.ini a little bit. That was the first week of class. The purpose unknown. But after that date I have not changed anything. So, should I install the test mail server tool where I have the xampp or in my program files?

Well, you are not turning in that php.ini file, so don't get hung up on it. Your instructor was probably attempting to help you test email functionality but in a really unnecessary way. In the real world, you would rarely, if ever, change that setting in the php.ini file.

First thing you need to do is change that line in your php.ini file back to localhost:

SMTP = localhost

Then you need to restart XAMPP. It does not matter were you install the test email program. What is important is that it is running. Install it wherever. Then run it.

After you have restarted XAMPP, then test the pages. The test email tool that I gave you makes it so that you don't have to mess around with the php.ini file in order to test emails locally. So go ahead and test with it. The email work, I assure you.
Customer: replied 4 years ago.

Hello again; I checked with the instructor and he wants us to use the settings that I showed you on a previous message. I think that he wants the project this way because he wants to test it himself. But I still have a doubt as far as meeting all requirements. Ok, if use my school email address it works fine, I do get the message in my inbox but if I use a fake one or any other email address I do get the error. It only accepts school's email addresses but if I want to see the message I need to use my personal school email address.

The above linked document probably explains what we did in the past and how we did it. You know he loves to take points I just want to make sure that we are not missing anything. Otherwise I would leave it as is and use my email address for all the offers/requests that use in the data base. If I owe you something else just let me know. Thanks

That just means that the school's SMTP server is blocking relay attempts. Most SMTP servers do that.

You are not turning in your php.ini file. It makes absolutely no difference to the code you are turning in whatsoever. No matter what you put in the php.ini file, the code that I gave you is the code you are turning in.

Those instructions that you have are for your testing benefit only. Your instructor will never, ever, ever see what you put in your php.ini file.

However, one item you should change is in Notifications.class.php

Near the top, you will see private $_from = "[email protected]";

Change that to your school email address.
Customer: replied 4 years ago.

I just noticed that the reset button on search.php does not clear the city or the dates. In chrome displays a drop down calendar but in IE or Firefox doesn't. In IE and Firefox displays the final days selected in Y/D/M instead of M/D/Y. Do you think we can fix these details?

The reset button is a built-in browser feature.

The calendar drop-down is an HTML5 feature supported by Google Chrome. It is not supported by IE or your version of Firefox.

Those items we cannot change.

What is "Final Days Selected"?
Customer: replied 4 years ago.

the outcome of date range boxes


You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor and 2 other Homework Specialists are ready to help you
Customer: replied 4 years ago.


I know you are going to be upset, I am too. I can swallow everything that he says except the validation point because is only true if you INSERT the record using cmd not if you use the program that we designed. The other one is the search issue, per the instructions he stated "by city and date" not "by city or date". My question: How can you implement validation when using cmd? I am afraid to challenge him because he is not happy with the database.class. I understand most of what you did, but not all.

Your instructor does not mean CMD. He is talking about the site. The site does have user validation. You need to ask him to clarify, because in the system that I sent you, neither form will permit you to submit the form without filling in data. If you modified either file and caused a JavaScript error, then it would allow you to enter no data. However, submitting with no data is impossible int he copy that I have.

I just confirmed in Chrome, IE 8, and IE10. So we know that the validation works in both old IE and newer browsers. Is there a link to your site where it is posted for class? Perhaps something broke since I last sent you the project.

For the city and date thing, I would challenge him if I were you. Tell him that he stated city AND date, not city OR date. He should know better. Instructions in development need to be specific and say what that mean and mean what they say. THAT is a basic concept of development.

The comments about the database.class.php are rather silly. That file contains database functions only. It is only used to interact with the database. I can assure you that multimilllion dollar corporations use exactly the same type of file for their systems. Now, if you were dealing with a significantly larger system, you would create a bunch of different files like this (called models). Though it seems that your instructor is not at all familiar with object orientation or the model, view, control concept. Both of which are basic concepts.

So it appears that he gave you a B. However, the validation does work (unless something broke since I last saw the project. Again, if you have a link, please give it to me).

And he took off points for that offers/date thing. The only thing he could say about that is if the rubric was available to you before implementing the code, then you should have consulted the rubric.

It looks like you would have gotten an 'A' had he not given you 0's for the validation part. The statement "there is no validation of user input" is simply not true. Again, send me the link if it is available.

Otherwise, I would push the issue of the validation. You did have user validation and submitting without entering anything is not possible. Was he missing the check.js file?

Customer: replied 4 years ago.

I do not have a link. I sent him a zip file with the codes. In my system the site works fine it does not allow me to add anything to the database unless all the text fields are filled out. I will take the chance and challenge him. Thanks anyway.


Challenging your professor cannot hurt, and as a student, you should never back away from doing so when it is necessary. I have been a student several times in my life. Instructors make mistakes.

Can you send me exactly what you turned in? I would like to take a look and see if there is any merit to what he is saying. I wouldn't bring up the database.class.php thing with him. He didn't remove any points for that and he does not seem to be "upset" about it. He was just trying to provide you with what he things is constructive constructive feedback. However, I have been the project lead and lead engineer for high-profile, massive web-based information systems that receive millions of hits a day and bring in massive revenues. And I am telling you that your instructor is not quite right about that. If you were creating a completely procedural system, then yes, he is right. But you implemented object orientation and created a data model for your system. At the very least, it a database-wrapper, which was common practice for real-word web applications before MVC became popular. The way that he wants you to do things is actually not really done in the real world. It is amateur and does not reflect how things really should be implemented.

In any case, he didn't take points off for that, so do not get hung up on it.

I am assuming that the class is over and you cannot resubmit?


A B is not a bad grade. However, you definitely should have received points for the user input validation, which would have given you a better grade. If you can send the the exact zip file that you sent in, that would be great.

Customer: replied 4 years ago.


This is the file.

Hello again,

Well, the validation works in what you sent him. Perhaps he has some type of internet security package that is blocking check.js

Here is what I would do if I were you.

Send him a message and simply state:

Regarding the user input validation, I did implement validation for every fields. The form, when submitted, runs through the functions in check.js. Per the instructions, each field must have a minimum length or else the form is not submitted. If any single field does not meet the requirements, then the word "FAILED" is placed next to that field on the page and the form is not submitted.

I do not know why you did not see this and do not understand why you are stating that there is no user input validation. There is user input validation and it works. I have tested it in Chrome, Firefox, IE8, IE9, and IE10. The forms will not permit the user to submit an offer or a request with empty fields. I am providing a screen shot of this. Is it possible that my check.js file is being blocked by something on your system? I do not understand why it does not work for you. I have had friends test it out and they confirm that the user validation works exactly as I am describing to you. I would appreciate if you could take a look. I worked hard on the user validation and it does function. While it may not be perfect, I certainly do not deserve 0 points for it.

Take a screenshot or two of the validation in action and send it along with your message. If you cannot send an attachment to him, post the image somewhere and give him the link to it. By asking him to take a closer look, he should see that you did indeed implement user validation and then modify your grade accordingly.

If he is unwilling to even take a look, then contact student services/academic support and ask for them to step in. Tell them that your professor made a mistake and that you would like the user validation for your project reviewed. You shouldn't have to do that... your instructor should review and modify the grade based on your message. However, if you do not hear back from him or he doesn't want to cooperate, then take it up with academic support (or whatever they are called at your school). Your instructor is paid to do a job and you presumably paid a significant amount of money for the course. There is really nothing in the world that you would pay thousands of dollars for and then accept less than excellent service, right? Why should a class or an instructor be any different?

You earned those points on user validation and you should receive them. Push the issue.
Customer: replied 4 years ago.

Hello; The professor did not change the points. He stated that he only used the cmd window to set up the database. For learning purposes only: how do you implement the same validation parameters that we have in the site within the cmd? I think we are missing a code in database.class.php. He is right, through the cmd you can do anything and it takes and moves the data or no data to the site pages.

That is not what he stated in you grade. He stated that he could fill out the forms and not enter anything. That is what is written in his comment.

Did you send the exact message that I sent you.

He also stated that there were missing commands in your database file, which would have been run on the command line. And he was right that there were a couple lines missing and he removed 0.5 points for that. We are disputing that at all.

User validation has nothing to do with CMD. The section that we are referring to in the grade is the section under User Validation -- user input validation, error messages, and persistence.

He obviously has no idea what you are talking about.

To answer your question: That is not possible. There is no such thing as user input validation on MySQL command line. You cannot create customer errors, etc. That is not the purpose of the command line and that is not "user input".

I think you and your professor are referring to two completely different things.
Customer: replied 4 years ago.

He only sent one sentence, "I only used the cmd window to set up the database". But, he did not explain me what should I have done to prevent this to happening. I agree with you that the user never use cmd. But, an intruder may alter the data through the cmd..

No, that still has absolutely nothing to do with user input validation. That would be security. If an attacker is to the point of having command line access to MySQL, you there is not much you can do.

I would reply to the professor and simply state. "I was not speaking of the database creation or insertion. I was speaking of the "User Input Validation" section of the rubric. The grading criteria is User Input Validation, Error Messages, and Message Persistence. That has nothing to do with CMD or creating the database."

I'm tell you. Your professor and you are not on the same page.
You need to specifically point to the areas of the rubric you are referring. This is user input validation and the error message are evaluated. That has ABSOLUTELY NOTHING to do with command line. You have absolutely no control over error messages on the command line. Nor is there any type of input validation on the command line.

He is not talking about user input validation. For whatever reason, he is answering a question you didn't ask. You need to reply to him and simply say, "I am referring to THIS part of the rubric, not setting the database." He took off points for database setup, yes. And you don't care about that. Two different issues.
Customer: replied 4 years ago.

Let me know when you are online in order to make the deposit for the next task. I have something new for you.

Hello again!

You can enter a new question here.

Please remember to start it with **For TheDoctor**

Thank you

Related Homework Questions