4
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by Josh Connerty
0

You can't have anything echoed to the page before the setcookie call, not even a newline.

How hard is it to read the manual? It has the answer to pretty much every question.

http://us3.php.net/setcookie (notice how the description has your answer, it would of taken a minute to find the solution)

0

How hard is it to read the manual? It has the answer to pretty much every question.

I find that a rather boorish response. The obvious answer is that it is not very difficult to read the manual, but the question should really be "how hard is it to understand the PHP manual if you are not very familiar with the language?"
I would say that the answer is "quite difficult and daunting".

Although the PHP manual is a great resource for those who are familiar with the language, the indepth wording of some phrases can be offputting to new users. Example: "Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it is automatically decoded and assigned to a variable by the same name as the cookie name. If you don't want this, you can use setrawcookie() instead if you are using PHP 5"

I feel it would have been much more pleasant, yet equally direct to say "This is explained in the manual at http://us3.php.net/setcookie. It is generally best to use the manual first, as it will often contain your answer and boost your understanding of PHP."

0

I find that a rather boorish response. The obvious answer is that it is not very difficult to read the manual, but the question should really be "how hard is it to understand the PHP manual if you are not very familiar with the language?"
I would say that the answer is "quite difficult and daunting".

Although the PHP manual is a great resource for those who are familiar with the language, the indepth wording of some phrases can be offputting to new users. Example: "Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it is automatically decoded and assigned to a variable by the same name as the cookie name. If you don't want this, you can use setrawcookie() instead if you are using PHP 5"

I feel it would have been much more pleasant, yet equally direct to say "This is explained in the manual at http://us3.php.net/setcookie. It is generally best to use the manual first, as it will often contain your answer and boost your understanding of PHP."

Everything is written plain English on that site. Nothing about it is hard to understand. Guess where I learned php? The php.net manual. If something is not clear research it. Don't know what urlencoded means, then search for it and it gives a nice understandable explaination. It just takes a little more time.

Its pointless to make a thread where the answer is just a minute away. Instead you spend more time waiting for a response, which is really just a waste of his/her time.

Here is how easy it is to find the correct answer:
1. Open a browser and go to http://www.google.com
2. Type in 'setcookie' and click search.
3. Click the first result which is usually the php.net manual.
4. Start reading and look there it is. "Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace."
If something isn't understood, then search for it using the steps above.

If I don't tell them to look into the php.net manual they will think its ok to post multiple pointless threads over problems that can be easily solved themselves. My hope is that they realize this and take the time to try and solve the problem.

1

If I don't tell them to look into the php.net manual they will think its ok to post multiple pointless threads over problems that can be easily solved themselves. My hope is that they realize this and take the time to try and solve the problem.

I understand the method behind what you said. I agree that in most cases it is better for someone to research the answer themselves through the manual. I just think that phrasing it as "How hard is it to read the manual?" might be interpreted as a hurtful comment, especially as they would not know the full context behind it. The original poster on this thread is relatively new to the forum and perhaps a more carefully worded response would have made the point equally well.

The manual is an excellent tool to experienced users of PHP who use it for understanding of how something works, but when you are new to it, long and complicated phrases can be offputting. I agree that sometimes you can find the answer much more quickly in the manual, and perhaps assertively explaining that to the creator of this thread would have also been helpful.

Ultimately this forum is here for people to post their question about PHP. I agree it's not the most elegant method for some questions, but it's the choice of the individual which resource they use.
We would probably use the manual or search online for the answer in other locations before posting here. Maybe this user tried that and just missed the answer. Maybe they didn't. The choice is theirs.

Votes + Comments
Very well made point I agree with you ;)
0

Simon and you are both right, I agree the manual is the best place to find your answer and saves us allot of, well, typing. Nevertheless this is supposed to be a friendly community. Just some constructive criticism, don't take it personally.

@DealthRune, the manual, as Kkeith29 stated, has the answer to your question. If you ever need help with an ilfunctioning script your welcome to ask us for help and we will be happy to help, but first use google to find out if there is another issue like yours and most importantly check the manual.

If at the end of this 5 minute check there is nothing or you can't understand what the solution is then we will be happy to help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.