Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. list(,$domain) = explode('@', $email); $domain = mysql_real_escape_string($domain); $domainsearch = mysql_query("SELECT domains FROM allowedDomains WHERE domains LIKE '$domain'"); $returnedrows = mysql_num_rows($domainsearch); if ($returnedrows<=0 ){ $err=$err."You must enter an acceptable email address";
  2. http://img683.imageshack.us/i/scrnshotwin7ff3613.png/ I'm using Windows 7 Ultimate and Firefox 3.6.13
  3. Quiz (id, ..) Question (id, quiz_id, ..) Answer (id, question_id, is_correct_answer, ..) You should also think about edge-cases, like: what if a user removes an answer, or rephrases it?
  4. list(,$domain) = explode('@', $email);
  5. You don't need to store it back into the array. The array will still be intact after you looped over it So like BlueSkyIS showed extract will be fine.
  6. I understand your point I've cursed at it myself in college when the teacher went all high-tech with his ... globals ... And setters/getters for each and every class variable because that's what encapsulation means, right? Be realistic, all employers want A-grade employees but they'll usually settle for far less because well .. it turned out he already worked at Google. Their is a serious demand of programmers and each year that demand grows so to make sure they won't be paying programmers like rock-stars they even settle for the office clerk down the hall .. he once talked to a programmer .. They taught me wrong, like I showed ^ up there ^ but I turned out alright, didn't I? ... FORTRAN will rule the world ... Yes and for that you pay 80K+ per year (plus expenses).
  7. It depends on the Quiz you are trying to make. If it's a typical Question and select from multiple possible Answers then a normal Question/Answer set-up will do. However, if you are after creating a Quiz that allows to make a Question but the Answer can be text as well as only a text input field then you will be required to go for a different approach.
  8. I disagree. You can't always choose where you go to college and these people deserve the same fair chance as you did. I concur. The degree is a guarantee towards your employer (and yourself, if you are not keen on staying current). http://content.screencast.com/users/DeviousDan/folders/Jing/media/7ffbf000-b6c2-4aac-bba3-ffc4581a6af1/2011-01-08_1848.png Showing off examples do not make your point any stronger. A college teaches you the basics and assumes the future and the company you work for will shape you. They give you the paper, but it's you who eventually paint the masterpiece.
  9. Wooohooo. Can't wait, always wondered how it would look like, can't believe I will actually live to see it I'm already stocking on pop-corn and 3D glasses
  10. That's because the path is relative to the script that called it. So if index.php includes Database then the database class has to include constants relative from index.php hence why it's desired to use an absolute path when working with multiple calling scripts.
  11. Woooowwww. Feels funny!
  12. Oooh. Try mine
  13. The . (dot) refers to the directory the file is currently in, so include('./includes is the same as include('includes however it's always best to use absolute paths instead of relative. Assuming the directory is in the root directory: include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/constants.php';
  14. output: abcdefghijklmnopqrstuvwxyzaaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazbabbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzcacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcyczdadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzeaebecedeeefegeheiejekelemeneoepeqereseteuevewexeyezfafbfcfdfefffgfhfifjfkflfmfnfofpfqfrfsftfufvfwfxfyfzgagbgcgdgegfggghgigjgkglgmgngogpgqgrgsgtgugvgwgxgygzhahbhchdhehfhghhhihjhkhlhmhnhohphqhrhshthuhvhwhxhyhziaibicidieifigihiiijikiliminioipiqirisitiuiviwixiyizjajbjcjdjejfjgjhjijjjkjljmjnjojpjqjrjsjtjujvjwjxjyjzkakbkckdkekfkgkhkikjkkklkmknkokpkqkrksktkukvkwkxkykzlalblcldlelflglhliljlklllmlnlolplqlrlsltlulvlwlxlylzmambmcmdmemfmgmhmimjmkmlmmmnmompmqmrmsmtmumvmwmxmymznanbncndnenfngnhninjnknlnmnnnonpnqnrnsntnunvnwnxnynzoaobocodoeofogohoiojokolomonooopoqorosotouovowoxoyozpapbpcpdpepfpgphpipjpkplpmpnpopppqprpsptpupvpwpxpypzqaqbqcqdqeqfqgqhqiqjqkqlqmqnqoqpqqqrqsqtquqvqwqxqyqzrarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzsasbscsdsesfsgshsisjskslsmsnsospsqsrssstsusvswsxsysztatbtctdtetftgthtitjtktltmtntotptqtrtstttutvtwtxtytzuaubucudueufuguhuiujukulumunuoupuqurusutuuuvuwuxuyuzvavbvcvdvevfvgvhvivjvkvlvmvnvovpvqvrvsvtvuvvvwvxvyvzwawbwcwdwewfwgwhwiwjwkwlwmwnwowpwqwrwswtwuwvwwwxwywzxaxbxcxdxexfxgxhxixjxkxlxmxnxoxpxqxrxsxtxuxvxwxxxyxzyaybycydyeyfygyhyiyjykylymynyoypyqyrysytyuyvywyxyyyzzazbzczdzezfzgzhzizjzkzlzmznzozpzqzrzsztzuzvzwzxzy I knew it'd work, see Now explain why it does this
  15. Haha! If that only really worked Try: for($i= 'a'; $i < 'z'; $i++) echo $i; And now run: for($i= 'a'; $i <= 'z'; $i++) echo $i; Produces suddenly the double number of results (and orders incorrectly) The answer lies in it's implementation
  16. I got my job quiet easily, I dropped-out of college and started looking for a job, I was hired on my first interview It didn't stop me from looking for other jobs though. OOP and MVC are 2 practices that are emerging in PHP and for your own future self you should start emerging yourself into these practices, having an understanding of what they are and how you write them should be sufficient to land you a job. You'll need a S.O.L.I.D. understanding to land you some better paid job though
  17. The example is completely ripped out of context, and only half definitions are given. We need to see some real CREATE TABLE syntax and data to make a judgment.
  18. The compound user_1 and user_2 is unique why add more unique values to something that's already unique? Adding the extra ID shows a lack of DB knowledge as you can easily reference a compound key from another table: Good insights! I always add a primary key, thinking that's just the way it's done. Obviously not so. I gain another gram of knowledge! Glad I could help
  19. You should first verify your server has FXP enabled which is unlikely if you don't manage/own the server as FXP allows an FTP-bounce exploit.
  20. You sure you eat enough vitamins, you look pale. Nice uniform though.
  21. You mean it hasn't already? No argument there...place is def a hellhole...but I was talking about beginning of Judgment Day: Jesus returns, believers raptured,all the worst parts of bible->revelation to start happening, etc... That's if they atleast got it right this time, they said 1996, then 2001 now they have fine-tuned their algorithm ... they say
  22. PostCount
  23. 4 sides = squared like this?
  24. http://dev.mysql.com/doc/refman/5.1/en/replication.html http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
  25. It worked for the Flintstones didn't it? They also had no need for road services ..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.