
For actual errors.PHP Code:error_reporting(E_ALL);
Oooooor spend less time bickering on forums and writing rather un-helpful tutorials and more time on learning more about the wonders of coding.
Learn about objects, programming structures, security, speed and just general awesome before you get ahead of yourself and start trying to teach people yourself. Normally I'd ignore a thread like this, but the arrogance you seem to be conveying on your extremely amateur coding knowledge, plus being rude to Trinity ()... is just out of place.
Spiffing.
*removed*
Edited by Trinity (Trialist Forum Moderator): Please do not be rude to other forum members/post to cause arguments.
Last edited by Trinity; 23-03-2011 at 03:55 PM.
@ the if statement.. You're saying that's easy because you don't understand the power of the ternary operator. Do you even know how to use it, it's GREAT for situations, and I use it daily.
Look bud, this isn't a tutorial, you're not helping people by posting code for people to "copy and paste" without even understanding what it is doing. It's different if you explain what mysql_query() does, how to handle errors from it, what it returns, etc.
It's great you're "trying" to help, but when someone who knows an extreme amount more than you criticizes you, take that criticism to heart and listen, not act all big and bad like you know it all, because as we can all tell from your code.. you don't have any experience in programming in general.
Edit: Just to prove that you are not an experienced programmer, because I have a feeling you're going to throw the "how do you know card", this is proof:
If you were an experienced programmer you'd know that this is sort of ironic. You're using double quotes ("") which means that the string WILL be parsed by PHP, yet you're terminating and using concatenation to parse the string. You don't need to close the " and concatenate the string with double quotes.PHP Code:mysql_query("CREATE DATABASE ".$dbname.",$con)
Using double quotes and parsing does use more memory than single quotes. Could argue minimal, but in a large program it adds up.PHP Code:mysql_query("CREATE DATABASE `{$dbname}`");
Last edited by Dentafrice; 23-03-2011 at 08:41 PM.
and if you were an experienced programmer, you would know that that is invalid syntax.
You're talking to Dentafrice, one of the most experienced and talented programmers that has ever blessed this forum with his presence. Do your research before you start casting aspersions.
Want to hide these adverts? Register an account for free!