Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. Some good advice. I generally try to learn and explore multiple languages in one area/group (web for example) and adjust according to the project requirements although I'm biased towards free, open-source languages. You will not easily find me learning a language that isn't open-source.
  2. Why not use a database instead of .txt files, a database is much faster not to mention cleaner.
  3. Not to sound, mean, but I use that exact code for my boards on my website. e.g. You posting a reply on here, you hit enter button, it supplies a "<br>"... And it works for every browser, not just some... Which is why I use it... Yes on your Windows machine. Now, try that on Linux and Mac and see if that still works
  4. That \n indeed did the trick but you used the wrong editor to open it, notepad requires \r\n
  5. If you have DNS access then you can change the Name Server setting to your NS of your main server. If they are all hosted on the same server you can adjust the CNAME settings so that all 8 domains refer to your main domain something like: www.main-domain.com A 10.0.0.1 www.main2-domain.com CNAME www.main-domain.com www.main3-domain.com CNAME www.main-domain.com .. Personally I use the latter to refer subdomains and I'm not entirely sure this also works for entire domains.
  6. This will only work if his editor used the same line breaks as the user's browser did (in your code) for example: $news = "This is my news.\nHey there!\nThanks buddy! =)\nHi!";//assume from $_POST echo str_replace("\r\n", "<br />", $news);
  7. That is not possible with the above CSS rules it's most presumably some other line that does that which is not shown in the above example as the rule that includes the *-character tells the browser to apply width: 99px on all elements that has a child-element HTML that has a child-element with class .faculty-img which is none as no element contains the root element. * html .faculty-img therefor should be .faculty-image Also class="/faculty-image/" is incorrect and should be class="faculty-image"
  8. I mostly use the first example in my views.
  9. You seem to say peoples db design is always bad? Would you be posting any questions on these forums if you had a great application- and db design? Presumably not, as most projects people are working on have a medium difficulty but mostly pick an over-complicated solution probably due to a limited knowledge of the subject domain.
  10. Neither IMO your db just has a very bad design.
  11. SELECT number, text, reply_to, time, m.date AS main_date, c.date AS comment_date, count(*) AS comments_count FROM main m JOIN comments c ON m.number = c.reply_to GROUP BY m.number ORDER BY c.date DESC
  12. In theory they are the same except that neil's solution will work when cURL is not enabled. @neil I chose the wrong words it should have been "You can use" instead of "You'll need"
  13. You are missing a "; and a ; Try: $query = "SELECT USERNAME FROM site_user WHERE username='" . mysql_real_escape_string($username, $db) . "' AND password = password('" . mysql_real_escape_string($password, $db) . "')"; $result = mysql_query($query, $db);
  14. Apparently I misread your question, you can use $_SERVER['REMOTE_ADDR'] if you are browsing locally as mentioned in my previous post (intranet).
  15. You are over complicating it: companies (id, category_id, segment_id, name, description, website_address) companies_addresses (id, company_id, country_id, address, city, postal_code, province) companies_contacts (id, company_id, job_area_id, title, fname, mname, lname, email_address, phone) companies_destinations (company_id, destination_id) companies_business_codes (company_id, business_code_id) destinations (id, destination) business_codes (id, business_code) jobs_areas (id, job_area) countries (id, country)
  16. STICK TO ONE TOPIC http://www.phpfreaks.com/forums/index.php/topic,295204.0 http://www.phpfreaks.com/forums/index.php/topic,295203.0
  17. I really laughed going through your code a good case example as to why you should 1) properly indent your code 2) adhere to a coding convention. $login_succes = 'Yes'; always executes whether the login was successful or not.
  18. Apparently they use Java as my JVM started to boot
  19. Oh really? http://www.mono-project.org Yes partial solutions for .NET-companies to be finally competitive with companies using Linux and Java, which pay 0 on licensing fees for both the OS and IDE (and it becomes even worse if they develop ASP.NET applications MS charges for that to).
  20. Correct. But you do have an Adjacency List Model (parent, child) and the article discusses that model. A probably better read would be http://www.sqlsummit.com/AdjacencyList.htm that not only explains it but also gives you a better approach.
  21. Nope. Because that would mean a syntax error ?!? They don't. But it's best to write 'em.
  22. Nope. We've all used her (many, many times).
  23. Does not show the local IP-address (unless your surfing on intranet). If your surfing on the internet it will show the IP assigned to you by your ISP. It can also show a made-up IP-address (like 0.0.0.0 equals all IP-addresses on the internet). The point is, you can't.
  24. Thanks, whatever I ate during lunch is now lying on the floor.. Why not just use a function for it? Your application is suffering from viscosity, which means that it's easier to build bridges around problems then to actually solve the problem. The added problem is that you are beyond the point-of-no-return in your application as rethinking your application structure would mean a complete rewrite.
  25. No it doesn't I can just remove all those extra lines and upload any file I want (using FireBug). Disabling JavaScript even does the trick.
×
×
  • 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.