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 TheDoctor** Additions and some modifications needed if

This answer was rated:

**For TheDoctor** Additions and some modifications needed if possible More info:

Hello again! Thank you for requesting me. I will contact you once this is complete.

Hello again!

You can download the completed copy here:

Everything that you requested has been completed. You may now update all of those items within the settings page.

You can only register with a email account. However, once registered, you can update your email account in settings to whatever you want.

When requesting a friend, you will appear on their friend's list as pending. They will have the option to "Confirm" or "Reject" you. This functionality is like Facebook. Until they confirm you, you will not have access to their profile. If you click on them before they have confirmed you, it will just let you know that "Friend Request Pending".

If you attempt to enter nothing into the search box, it will no longer work.

And finally, sending a message now gives the feedback "Message Sent Successfully"


You will find within the zip a file called newAlter.sql. As usual, run the alter statement in your database in order to support the new friend confirmation functionality.

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.

There is only one thing

When clicking on a friend from the feed page when you click on the picture it opens up the friends page as privat, but if you go to friends page and click on that same friend it work fine any idea why.

Download this file:

Replace your profile.php with this one.

Let me know if you need anything else.

Please remember to rate my answer. Thank you.
Hello again,

You should now be able to view the profile just fine. It was not functioning correctly before because I had actually commented out some code in order to test thew condition structures for the new confirmation functionality. I just forgot to uncomment the code.

Let me know if you have any other questions.

Please remember to rate my answer. Thank you again.
TheDoctor and other Homework Specialists are ready to help you
Customer: replied 4 years ago.

There was one issue I found with the profile request and search form if you could fix it for me.


The issue is when you request or confirm a user as friend that works fine but when you search the user who is your friend it shows under the users pic to Confirm or Reject even tho he/she is you friend already.

Download these files:

It is just the Database.class.php and the Constant.class.php

Replace them in your include folder.

Thank you
Customer: replied 4 years ago.

I think you send me the wrong link or the wrong file zipped this one is html and css pages


You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 4 years ago.

1 more issue I found is If a user types aposts and types ' it writes / instead. Ex: It' s nice today. It writes It/s nice today

Hello again,

I just wrote "it's a nice day" in the group feed, the friend feed, and the messages. In each case, I was not able to replicate what you are describing.

Have you been editing any files at all? For instance, attempting to add data cleansing of some sort?
Customer: replied 4 years ago.
Hmm okay I migh have done something. I apologize and thank you sir
Customer: replied 4 years ago.

I just checked the last project you did and it still says the same when i type a comment again When i type: It's if come out as It\'s.

You can go to to see the screen shot.


I thought I mighta have changed but i just unizpped the last project you did for me and the same thing is happening. Its just wierd

Those are called escapes. They are added in the database automatically as a result of real_escape_string. They are supposed to be there.

However, they should be automatically removed when selecting from the database. Odds are, you are not using the latest versions of PHP and/or MySQL.

Now, if you were to do something like "addslashes", you would be doubling up on the slashes and it would cause an error. That error would persist if you viewed the data in any version of the site because the database would have multiple backslashes it it (i.e., the database data is now corrupted).

Dump your database file and send it to me please.
Customer: replied 4 years ago.


I think i lost and messed up my sql totally, I'm sorry for bothering you I messed it up I will figure it out, No need for you to waiste you time

The SQL that you sent has no instance of "It's a nice day" in it. That was the goal of look at the data. I would have to see that instance in order to see if the data is messed up.

It sounds to me like at some point along, you used something akin to the addslashes function, which is not necessary when using real_escape_string (which is far superior).

If you use addslashes, you may be forced to use stripslashes later. However, addslashes, again, is completely unnecessary when using real_escape_string. Both are an attempt to escape a string. But the real_escape_string is the one that should be used, as it is built specifically for the database.
Customer: replied 4 years ago.


Here is my sql i found it

Yes, you have messed up data in there. It appears as though some function was run on the data because the code I gave you does not add backslashes at all. You have double backslashes.

I would need to see your code the way that you have it now (not what I sent you).
Customer: replied 4 years ago.

Could you resend me the last project you did with the sql database i have lost it

Here is the project:

I am using PHP version 5.4.3 and MySQL version 5.5.24

Nothing in my code adds any backslashes, not even real_escape_string. Real_escape_string escapes quotes by doubling them up, not by adding slashes. If you log in as:, password

You will see that I was able to add the single quote in fine without any backslashes being entered anywhere.
Customer: replied 4 years ago.

Thank you so much, Just one last question even after i opened the project you just send me its still same thing happening could it be something else maybe my localhost? its so wierd

What do you mean that the "same thing is happening"?

Using my code will not change the data in your database. You would need start a brand new test. If you look at the old record that you have, it will always have that slash on it because that is the way the data is in the database.
Customer: replied 4 years ago.

I uderstand but with the you just send me i importeted that sql into a new database and typing it the slash is still coming on. Thats why im confused because even the first project you send me i tryied and havent changed any code it happening could it be my computer or something

Alright, we can try two different things:

1.) We can set up a remote session and I can take a look at your system directly.

2.) I can write a function that eliminates backslashes altogether. However, this is a bit of a hack.

In either case, I would need to kindly ask that you enter a new question, starting it with **For TheDoctor**.

Thank you
Customer: replied 4 years ago.

Sounds good I will do it tomorrow.


Thank you!

Related Homework Questions