I agree, thank you and I would really appreciate that!
The assignment is due April 18th, but it would be beneficial to have it earlier so I can test it and be comfortable with it.
Awesome - thank you very much!
Thank you very much for your quick response and assignment completion! I will work with it in the next few days and weekend to make sure I understand everything and get it working. I do have XAMPP and SQL installed on my computer. I will be in touch soon.
Thanks again and have a good night!
I will remember to rate your answer - I'm looking forward to trying it out!
I tried the site last night and had some errors but I haven't had a lot of time to work on it. And tonight was hockey play-offs so just got home... busy times! I'll touch base with you tomorrow. I'll likely need your help.
Yes I'm not worried about that... I just have to make sure my SQL is running properly on my computer and make the changes you suggested in your earlier message and then see where I'm at. I just haven't spent enough time on it yet.
Thank you for your help!
Yahoo - the assignment works perfectly! I had to get MySQL running first which took me a bit of time; then adjusted the files according to your instructions and it's a beautiful thing! Thank you very much.
Now I just have to complete 2 quizzes - one this week and one the following week and the course will finally wind down.
Again I appreciate your assistance!
Thank you again. If I run into any issues in April when I have to upload the files, will I be able to ask for your assistance? I doubt if I will, but just in case...
Have a great day.
Excellent - thank you!
Hello I'm back! I need to submit my assignment by April 18. As per our instructions, I have to post individual files so I removed the files from the 'includes' folder and put them in the same directory as the index and took out the references to the folder. It works on my computer, but when I upload the files, I receive this error:
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /var/www/htdocs/home/nancy/include.php on line 4
I'm not understanding the second part of our instructions for uploading which is likely the problem. Here are the instructions:
"Assignment 2 is due on Thursday, April 18. When you submit the assignment, you must use PHP to create and populate your MySQL tables on the assignment server. Your access to the Apache server is the same as for Assignment 1. The MySQL server is localhost. Your MySQL username and password XXXXX the same as your Apache username and password.
You have been granted full privileges to a database that has the same name as your username. For Assignment 2, user jack who accessed https://lamp.magcomputing.com/home/jack/ with password XXXXX for Assignment 1 will have access to a database named jack at the MySQL server named localhost using username jack and password XXXXX"
I've changed the username & password XXXXX database.class, but I still get the same error.
Do I need to rename my database? Should I be asking my instructor about the instructions or can you help me with this?
Thank you for your assistance.
The project I gave you does not include code to automatically create and populate tables. You never gave me those instructions and they were not part of the instructions given by the previous question. Doing so is not a common practice with PHP. People usually create their databases using the DBMS, not PHP.Doing so will require another script. Also, you cannot simply change the directory of the files and have them work. You would have to rewrite the include.php file. Even if you uploaded into separate folders, they are still "individual files".So you need to rewrite include.php and you need to write a new script to create and populate the database.
You can download the altered project here:
There is a script called createTables.php
Open that file and change the username and password XXXXX the database so that it connects to your database server on your school's account.
Once uploaded, go to that file. Only go to it once. It will create the database and tables.
Thank you for the revised files! I uploaded the new files, inserted the username & password, then uploaded to the school account. Then I went to "createTables.php" and received this error:
Warning: mysqli_connect() [function.mysqli-connect]: (42000/1044): Access denied for user 'nancy'@'localhost' to database 'college' in /var/www/htdocs/home/nancy/createTables.php on line 15Fatal error: Call to a member function multi_query() on a non-object in /var/www/htdocs/home/nancy/createTables.php on line 70
I'm sorry to bother you with this - I'm having trouble understanding it.
Awesome - thank you so much! Yes the username they gave me is "nancy". I will try this when I get home from work today.
I appreciate your assistance!
Hello again. I'm sorry to bother you, but my deadline is getting close. I've made all the necessary changes as you instructed but am getting these errors. Am I supposed to change anything in the "include.php" file?
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /var/www/htdocs/home/nancy/database.class.php on line 12Fatal error: Call to a member function query() on a non-object in /var/www/htdocs/home/nancy/database.class.php on line 21
My instructor sent me an email saying "include.php is trying to load Database.class.php which is not installed on the server. If you have Database.class.php on your test system, you will have to upload it and any other additional modules you used at home."
But I have uploaded all of the documents - I don't understand how to fix this issue.
Your assistance would be greatly appreciated!
Hello again, Nancy.You do have Database.class.php installed. You see how the error is coming from database.class.php? It wouldn't say that if it wasn't installed.The error that you are receiving is not a programming error. That error is coming from the database. It states in plain English what the error is.The database is denying access for a user called root, who is using a password.So it would appear that you opened the database.class.php file, changed the password, but left the user name as root instead of changing it to your user name. As I have stated previously, you need to change the username and the password XXXXX match your credentials. That file still has "root" as the user. Change it to your username instead and then upload it again.
This is what I have in my database.class.php and createTables.php (i removed the password XXXXX this note):
DEFINE("HOST","localhost"); //The Database host addressDEFINE("USER","nancy"); //The user name set on the databaseDEFINE("PASSWORD","xxxxxx"); //The password XXXXX the database userDEFINE("DATABASE","nancy"); //The database name
I reuploaded all of the documents and now get these errors:
Warning: include(Database.class.php) [function.include]: failed to open stream: No such file or directory in /var/www/htdocs/home/nancy/include.php on line 6Warning: include() [function.include]: Failed opening 'Database.class.php' for inclusion (include_path='.:/usr/lib/php') in /var/www/htdocs/home/nancy/include.php on line 6Fatal error: Class 'Database' not found in /var/www/htdocs/home/nancy/index.php on line 9
I'm sorry I'm not looking too bright - I'm still having a hard time with this course.
YAHOO it's working!!! I also had to change helper.ca to Helper.ca. Thank you so much for your help - I really appreciate it!! I'll be able to sleep tonight!
Have a good evening,
No problem. Linux-based servers are case-sensitive. Windows are not. That's my fault. I apologize. Have a good night!