PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hey, I came across a problem with my private messaging. First, users can can send message on a users profile, then enter in a subject and comment.
From there it notifies the user they have a message, and They can click on the subject to open it. My only problem is that when no subject is entered, it shows the sender name and date but there is nothing to click on.... how can I make it say (no subject) when nothing is entered? here is my code:
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
ambivalent wrote:When the message is being submitted, have the form processing insert "No Subject" as a default if none is entered by the user.
Thats what I want to do im just not sure how to code it... I payed someone to do the system for my then they abandoned the project due to computer problems, so im stuck trying to fix it with little PHP sense.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
This way you don't put extra data in your db, especially bogus data. The subject column is for message subjects if it doesn't have subject leave it empty. You can also use IF() im your MySQL SELECT to check if the subject column is empty, if it is return 'no subject'! What you can do in the database is always better than doing it in scripting after you get the result!