if you follow a few simple guidlines when posting you will be more likly to recive an accurate reply quickly and with minimal fuss.
Search. Click on search at the top and enter your term, the odd's are someone will already have asked your question.
Describe. Tell us what it should do, how it is to do it and what's wrong if your getting an error. If your unsure how to go about something then tell us what it should do and try to tell us anything you have already tried, this provides us with more info about what will and wont work.
Use the forums built in [php] tags around any and all coded sections(HTML as well as PHP). Your code will then be easier to read allowing us to be more accurate in our responses.
Indent. I can't specify this enought, but often the problem could be a simple matter of a missing brace("{" or "}"), this is more common than you think.
Ask a question. If you just give us information, no mater how accurate unless we know what you want we cannot help you.
If you have a script from a premade souce, ask the author, they will proberly know more about it than us.
Cut down. try to post only the relevent lines unless we ask for more, it ensures we will not be put of(and considering we do this for free it's not something you want) and can reply quicker.
Thank you for reading this.
If an admin/mod could sticky this it would be a great help.
Feal free to add your own comments as reply's to correct me, elaborate or even just add something I've missed.
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
For instance, if some_function($x, $y) is not working, try adding some code to verify that the variables concerned are set to what you think they should be, and see what value the function is returning:
PHP Code:
# DEBUG
echo "<p>DEBUG: x = $x</p>\n";
echo "<p>DEBUG: y = $y</p>\n";
# /DEBUG
$result = some_function($x, $y);
# DEBUG
echo "<p>DEBUG: result of some_function($x, $y): $result</p>\n";
# /DEBUG
Doing this sort of basic programming technique will often answer your question for yourself.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
look, this 2 stickies might be of some use, http://www.webdeveloper.com/forum/sh...ad.php?t=68853 , wkrauss a newcomer actually use the code and php tags in his post, on the other hand the user who answered, felgall, didnt show a good example by posting his code unstructured.
If you are having more trouble with your scripts refer to this article posted by NogDog. With the refering additions in this thread. It shows good ways to debug your scripts for development and deployment!
But i argee with all in the thread, good point have been brought up and please remember to use your tags when posting!
If you're using a database using a numbered index, make sure the numbers agree with your PHP. This is so easy to mess up, and it won't even return an error message. And guys who answer, check for this, too! Ask if a group of files used in an array or a numbered index starts with 0!
Last edited by Mr Initial Man; 12-11-2005 at 05:21 PM.
If you're using a database using a numbered index, make sure the numbers agree with your PHP. This is so easy to mess up, and it won't even return an error message. And guys who answer, check for this, too! Ask if a group of files used in an array or a numbered index starts with 0!
huh?
that's a logic error, not a programming error.
It's still an error, and it happened to me. Logic errors are just as important to check as programming errors.
true.
Then again, if you're using a database, why would it matter what the index is at all? What happens if you delete entries 1-10, the new first index is 11. If you're hard coding your first point you're going to run into trouble there.
Another thing:
When someone offers you a code revision or tells you to put something into your code and try it, do it before continuing to say it doesn't work! Just to be sure, when someone gives you a code revision, put the WHOLE thing they give you in place of what was there. Most of the time, they will give you exactly what needs to be changed, so change exactly what they say to. (Atleast give it a try!)
Check the manual! I don't know how very many problems I've seen caused by people being too lazy to search the manual for the function they're working with.
Always preview. Use the preview button before posting. (this option is available on the advanced post reply page)
Turn off unnecessary items. Turn off "Automatically parse URLs" and enable "Disable Smilies in This Post" to avoid problems with the code you post. (These options are available on the advanced post reply page)
Mark your thread as resolved. If a solution that you are happy with has been posted, using the thread tools menu at the top, mark your thread as resolved.
Show some gratitude. Don't forget to thank the people that bother to try to help even if their solution wasn't perfect.
Avoid story questions. Don't include stuff like this with your question: "I am new to webservices and am at a loss with this one. I have bought several books to try and help as well as countless Google searches to try and solve me problem to no avail. Maybe I am over complicating the situation based on all the different things I have attempted to read over the last couple of days.".
Bookmarks