Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. It's pretty dumb to query your table twice for something so meaningless, use: SELECT field, field FROM table WHERE username = $username || email = $email Afterwards check in the record set a row contains the username and if a row contains the e-mail. Or like I said previously and roopurt quoted: create a UNIQUE index. MySQL will throw an error (mysql_errno()) search which that is when you insert an already existing e-mail address or username.
  2. If you want those 4 columns to dynamically expand use something like: SELECT field, field, count(*) AS total_rows FROM table LIMIT floor(total_rows / 4) * 4 (not sure you can use functions in the LIMIT-clause, the Math may be improved to) Or if each column has a pre-defined number of items (assume 10 for each column), use: SELECT field, field FROM table LIMIT 40
  3. No, not at all only foreach does not advance the internal array pointer next() does. Why don't you just use $name as it's the key()
  4. create a UNIQUE index on the e-mail field or query the database before every registration if the e-mail address is already registered don't put a unique index on the password field as it will be quite weird to read
  5. When you call session_start() with session.cookie_httponly off, then it creates a cookie otherwise it searches for a session.name parameter that should hold the value for session_id() and loads the corresponding session if their is one. What fr34k said was thus correct, you probably misunderstood.
  6. ignace

    Education

    @cags The secret: The catch:
  7. Why create such a ridiculous campaign? Or have they shifted their market to ignorant users only? They just give all Windows-haters a reason to hate them, instead of trying to convince them. @Neil HAHA I don't doubt you can find that somewhere in their features list aswell @CV XSS and the likes spread through Facebook, Twitter, ..
  8. ignace

    Education

    AND BE ON TIME. Damn, I know 3 freelancers and 2 of them have time issues. Once in a while I meet with those 2 and they are ALWAYS late, when a client calls they tell them to meet them in one hour. Right, one hour later we are still talking and they probably even forgot about the meeting with the client.
  9. A common mistake that will keep haunting you. You can't wait until this project is over and you receive your payment. You think, this is the last time I ever do that. Wrong! He'll start telling his friends of this "cheap webdesigner" he knows, and they'll start knocking on your door expecting to not pay more then he did. Basically, this project bought you a one-way ticket to hell Instead of your worth going up, it goes down as any price above this price is seen as unfair. Read: http://freelanceswitch.com/money/the-price-is-right/ And more broadly: http://freelanceswitch.com/blog/explore/#2 Working for a cheap price is depressing, it takes away creativity and motivation. And the result scares away both visitors and prospects.
  10. I also doubt any experienced persons will join those groups as they can't be bothered answering questions from everyone who joined the group. So you get beginners helping beginners and no-one that can correct when something wrong is being passed.
  11. ignace

    Education

    Some do not exceed to support even themselves in their entire freelancing career.
  12. I got an e-mail from Microsoft with the following image: "Bescherming tegen social engineering malware" = "Protection against social engineering malware" Is it just me? Or is there something really wrong about this picture
  13. What is your setup? Will you teach these subjects? If you are, then you should have a very good background in all of these as you can't just say things without knowing it for sure. Website development is a very broad field, you have: 1) network (tcp/ip, http) 2) server (linux, windows), LAMP + WAMP installation, .. 3) website design 3.1) wire-frames, mock-ups, prototypes 3.2) usability, accessibility, SE marketing 3.3) card-sorting, .. 3.4) color theory 3.5) html, css, js, .. 4) website development 4.1) basic syntax 4.2) dynamic- vs static typed 4.3) types (scalar, non-scalar), constants 4.4) expressions, operators, control structures, (popular) functions, diference between classes and objects, exceptions, what are references, .. 4.5) security 4.6) different methodologies, naming conventions, .. 4.7) manual use 4. advanced features: PDO, session_set_save_handler(), php.ini, filter_*(), ctype_*(), .. 4.9) XDebug, PHPUnit, IDE use, .. 5) social media integration And I'm only scratching the surface here
  14. It's overall better but you should stick more to what I gave you especially the DAO objects, use a CRC (Class Responsibility-Collaboration Card) if you have trouble figuring out what a class responsibility is and what isn't.
  15. ignace

    Education

    If the university/college has great teachers which are passionate about what they teach and have a great background in what they teach, then go for it. I've attended 2 college's none of them worked for me. I always felt like a QA-agent for students: correct teachers when they were wrong, why they were, and how it then should be done instead. Like: Why globals are bad; Why $password = md5($password) is weak; The CSS property "position" does not have a "right" value; That IN() can be used instead of looping; str_replace() CAN take an array as search parameter; stdClass is not the base class of every created class; ..
  16. ignace

    Education

    A BS guarantees the employer he will be able to do the job (in some form). The company I work for shares my vision and that's to not base your opinion on degree but instead base it on facts. Every candidate receives a few questions he needs to answer + an example program he needs to explain that tests his active knowledge on the workings of PHP and the manual. And to be honest every time their is a new job opening it takes a serious amount of time and contestants to be filled. My advice: learn PHP well (ZCE well) and show off that knowledge during a job interview.
  17. No, of course not. There are multiple options, but this one is by far the most flexible.
  18. Quite possibly, I should have been sleeping already. Even the matchsticks that I use to keep my eyes open are getting tired
  19. $search = array( 'ST' => '', 'TS' => '', 'SP' => '', 'TP' => '' ); $count = 0; $text = str_replace(array_keys($search), array_values($search), $text, $count);
  20. You need to use a template engine (like Smarty) then you can do something like: $engine->display('layout1.tpl');
  21. HTML thus. Do you use a template engine?
  22. I didn't understand what he was trying to say as he said: Which somewhat contradicts.
  23. What do you mean by another layout? HTML or CSS?
  24. $count = 0; $text = str_replace($search, $replace, $text, $count); Read the manual and learn.
  25. Why don't you? It's so easy, you think about a certain page, start drawing some sketches and as you are drawing new ideas come to mind and you revise until you get no more new ideas. In a few minutes time you created a sketch with refreshing ideas that your client (mostly) loves. It also gives you sometimes idea's for other pages of the project. I bought myself a big sketch-board to hang to the wall. The sketching mostly gets out-of-control by which I waste a lot of paper, that's why I bought the sketch-board to save paper Since, I started sketching I have got some very great response.
×
×
  • 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.