-
Posts
571 -
Joined
-
Last visited
Everything posted by Anti-Moronic
-
How to send multiple variables into database?
Anti-Moronic replied to dwex's topic in PHP Coding Help
..and escape your data! Damn. $postvar = mysql_real_escape_string($_POST['postvar']); -
Made template class, how to incorporate into overall layout?
Anti-Moronic replied to Zurev's topic in PHP Coding Help
Agree fully with Pikachu..sorry, thorpe. PHP *is* a templating language, it is meant for stuff like this. Originally, this was the languages primary purpose. The above example is very well thought out explanation and example. Another idea might be to actually review some of the frameworks (like Zend) and apps (like Wordpress) and see how their MVC layer works. This will give you a more in depth look. -
Sorry, I meant you and thorpe have the same face...I am always getting confused behind the scenes :S
-
LOL Finally. hahahahaha classic. Pikachu you have such a serious face, it's hard to tell.
-
You might be able to make your point a little better if you're straight up about it. Could you rephrase?
-
Makes a very important point. You will have trouble finding 'advanced php' books because php itself is not that advanced of a programming language. I sometimes find myself switching off from time to time when I'm programming in php because it's so damn easy when you 'know' it. The only challenge now is keeping on top of modern web technologies. Programming in general: the rabbit hole goes very deep. Hurts my head. Oh, I'd also second that pragmatic programmer. This is one of THE best programming books I've ever read. You can see other recomendations here: http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read Code Complete and Pragmatic Programmer! For php: Php 5 Objects Patterns and Practice by that matt guy.
-
My thoughts on this are I can't wait until more employers wise up and actually EXCLUDE certain candidates based on where they obtained their degree. It is absolutely shocking that we have people asking questions who are taking a degree in 'web design' or 'php' who are being taught techniques used 10 years ago! No emphasis on security, some still using php4 and relying on register_globals. Using tables for layout, inline css..these are tiny things but imagine how many more 'tiny things' add up to create a crash course on how NOT to be competent at ______. They should be named "how not to do _______". Like, I got a degree in "how not to do php" and I've not been able to get a job for 6 years! Ugh..it's makes me feel sick. I'd only ever do a formal course after I've had chance to review and validate the material. My brother is starting in computer science within the next two years and I've already told him to forget about learning web development at college, teach yourself and do software engineering instead. I could probably talk for hours about this. Really annoys me, because I would be pis*ed if I'd spent w/e on a degree only to realize I know NOTHING and in fact would be considered a bad programmer.
-
I really dont Also thanks Anti-Moronic i will look in to doing it that way No problem. Please do come back if you have trouble implementing things this way! Be glad to help.
-
Technically your project consists 99% out of procedural (PHP + MySQL + Apache + Linux) with a thin layer of OOP (what you wrote). Also, do you know that static functions by definition are procedural code? Don't take this personal we are arguing about your arguments not about you! We only try to explain to you that you should not become too attached to a language or a methodology and that you should experiment with different languages and different methodologies and find the best in each. Evaluate on each new project which methodology will suit the project best and the language unless your client explicitly states a language and a methodology or some other factors prescribe it (eg write a module for a VB.NET driven project). Sorry! I've allowed myself a couple of weeks before I came back to this topic. As you can tell, I have some strong views and I am quite ignorant and stubborn in some regards. First, I'm talking about the overall structure, not the actual source code. My black and white attitude is OOP is better for *most* applications. I rarely find myself in a situation where OOP would not provide a better solution, and that means in terms of an 'expected approach' to maintainability and extendability. Using OOP in the past on codebases of 10k+ lines has saved me a *lot* of money and time during [even design, ] development and maintenance. I don't choose OOP because I think it is 'better' in any sense, I choose it because it is more convenient for *me*. If there were a decent framework built using procedural which outran the other frameworks I would no doubt take a look, and use it. With clients and such, the issue is they don't really know what they need, they just know they want something someone else can work on in the future if I roll down a mountain and die. I'm not against procedural, I'm just a big advocate of OOP. I think this sums up well why OOP exists. http://www.essortment.com/all/objectparadigm_ruqg.htm I didn't realize this was such an endless topic for discussion either. I never really thought about it. I just thought it was a given. Seems I need to open my mind a little more, remember my roots
-
Screenshots will definitely suffice. Once you've built up a reputation you're not going to have to worry about proving the templates work with live previews. What you could do is feature a single template for *free* which is packaged exactly as your other templates (with screenshot etc) and allow a live preview and download. I would have thought that would increase the confidence people have in your templates.
-
I quit smoking a few years ago and thankfully haven't once even considered smoking again. I'm young so glad I nipped it in the bud so to speak. Was heavy smoker for about 6 years from 12-18. 12..heavy smoker lol The only thing I hate about Portal 2 is that it's only 2 players co-op. I was hoping for portal-mania I haven't played any mods because I didn't knew their were any, but now that you mention it would be nice to play them while I wait for Portal 2 to come out and I can stop playing L4D2 16-player co-op After I finished Portal I have tried the various tricks you find on YouTube to complete a level < 10 seconds or so. I haven't been able to do all tricks, some were too difficult to master. haha no way. Didn't know they did 16 player co-op on L4D2. I played entire campaign on hardest diff with a friend. Probably one of the hardest games I've played just 2 players. Yeh, you definitely have to check out those mods. I'm not lying when I say some of them are literally better than the original game and expand it that much it is like portal 1.5. Perfect warmer for portal 2!
-
If you know you're stuff you're not going to have a problem finding a j.o.b. However, if you want to work on some 'easy' stuff, consider doing a little freelancing as you can then pick and choose what work you do. That will get you some real world experience but certainly not in the job sense. One of my friends quit his job to do freelancing full time as the freelancing he did in his spare time was earning him more than his salary for less hours. Just throwing that out there. You have options. I just started taking on far larger projects recently and actually hire a few freelancers to help me deal with the workload. The sky really is the limit. The problem is YOU have far more responsibilities, and you have to do project management, business management, accounts, actual programming etc Hopefully in the future I'll be in a position to move fully into project and business management. Oh, you might also consider looking for 'junior web developer' positions with startups. If you know html/css well and general web technologies you should fit well with something like that. Don't expect a more senior job until you have some S.O.L.I.D understanding web/html/css/php
-
having a table always appear at top of screen
Anti-Moronic replied to cliftonbazaar's topic in HTML Help
I'll echo that. Don't use tables for site layout. Modern use for tables is forms and tabular data as Haku said. you might find this excellent tutorial useful: http://www.smashingmagazine.com/2009/10/26/modern-css-layouts-the-essential-characteristics/ -
scare you away from php? YES! Professional, competent developers are sick of seeing sloppy code all over the place produced by cowboy programmers who don't know what they're doing....and I'm NOT referring to you. It's highly doubtful Pikachu is doing anything but trying to help you as best he can. You have to also understand that sometimes we have to write code 'defensively' because we are not the ones testing it in your environment. For that reason, it might appear overcomplicated. It is not. This is php 101. If you're having trouble with this, consider reading up on some beginner tutorials.
-
No, it's a nightmare way to design a database. From what I can see, you should only need a few tables. table_anime table_anime_episodes table_categories You can easily create a relationship between these tables without creating a new table per anime. Imagine if you insert 10,000 anime shows..by your current design you will be creating 10,000 tables. Cmon, surely you can see there must be a better way? That better way is above ^^ table_anime has an id, which is refered to in tabel_anime_episodes, table_categories has an id which is refered to in table_anime. Something like: table_anime.ID = table_anime_episodes.anime_ID table_anime.cat_ID = table_categories.ID Now you can insert a MILLION anime shows (not sure if that many exist and you will be able to manage the data *with ease*. If you're not careful you are going to create for yourself a big big headache.
-
Sorry, I mean we need to see the function call and the previous and next 10 or so lines surrounding it. As in, let's see the function call but not the entire script. On this 'refresh' theory, it is very very easy to see if that is the problem. You disable refresh in your browser or you just take note to see if the browser is being refreshed..I mean, that would be extremely obvious if it was that. Maybe somebody else can pitch in because I have absolutely no other ideas on how to debug this for you. The purpose of using ECHO "dfsafsda" is so that IF your ajax was then running this function it would likely output something. That is the only other thing I would take note of. If your ajax is requesting the same page or another page in your app which runs this function, this will happen. So, we now need to see 1) your function call, there may be some bad coding which is running the function twice for whatever reason, 2) your ajax calls, and what scripts/functions they are running.
-
See how long it takes to find my name: Dromodor Kastalian It doesn't handle spaces That's ok. You can just use my native first name: dromodorialmakirvahumvete
-
See how long it takes to find my name: Dromodor Kastalian
-
I am totally baffled at what is going on. To be honest I can't even understand a-z, but a-zz, a-zzzzzz?? what the hell is going on? :S
-
Exactly, they're help forums. You're not asking for help. You're asking for work..for free..because we got nothing better to do but sit here waiting for people who are BEYOND help. Please, get your priorities straight. You say you need urgent help yet you spent 6 months looking for a solution, that isn't an urgent problem. And if your last resort is a help forum plea for a script to be built form scratch *instead* of the common sense approach - hire somebody who can spend time with you - then I dunno.
-
"PS I am not only the webmaster, I am also the model of the site concerned, hence the reason I am no programmer." ..post after, you get your code. VERY clever Ugh, you need to hire somebody to do this for you. How much is your time worth? How much is 6 months worth? $20? because I'm telling you go over to a freelance site and you can get this done for that or less in an hour.
-
output: abcdefghijklmnopqrstuvwxyzaaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazbabbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzcacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczdadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzeaebecedeeefegeheiejekelemeneoepeqereseteuevewexeyezfafbfcfdfefffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzgagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzhahbhchdhehfhghhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhziaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizjajbjcjdjejfjgjhjijjjkjljmjnjojpjqjrjsjtjujvjwjxjyjzkakbkckdkekfkgkhkikjkkklkmknkokpkqkrksktkukvkwkxkykzlalblcldlelflglhliljlklllmlnlolplqlrlsltlulvlwlxlylzmambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymznanbncndnenfngnhninjnknlnmnnnonpnqnrnsntnunvnwnxnynzoaobocodoeofogohoiojokolomonooopoqorosotouovowoxoyozpapbpcpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpwpxpypzqaqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzrarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzsasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvswsxsysztatbtctdtetftgthtitjtktltmtntotptqtrtstttutvtwtxtytzuaubucudueufuguhuiujukulumunuoupuqurusutuuuvuwuxuyuzvavbvcvdvevfvgvhvivjvkvlvmvnvovpvqvrvsvtvuvvvwvxvyvzwawbwcwdwewfwgwhwiwjwkwlwmwnwowpwqwrwswtwuwvwwwxwywzxaxbxcxdxexfxgxhxixjxkxlxmxnxoxpxqxrxsxtxuxvxwxxxyxzyaybycydyeyfygyhyiyjykylymynyoypyqyrysytyuyvywyxyyyzzazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzy I knew it'd work, see
-
or maybe: for($color = 'white'; $color < 'black'; $color++) echo $color;