Jump to content

nickk

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nickk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I remember hearing that MD5 isn't extremely secure (when used to hash passwords stored in the DB). Whats the general consensus now? Is sha1 + salt sufficient? Thanks
  2. No, the project I'm about to start will be used in a professional setting so I have to make sure its accessible to everyone.
  3. In a follow up to my post on how to code PHP in a professional manner (http://www.phpfreaks.com/forums/index.php/topic,291398.0.html), I decided to start this one Background: Have been coding for a number of years, but nothing that was accessible to a large amount of people, so my HTML & CSS was randomly thrown together (I think 90% of it was divs with floats and clears lol) and tweaked until it sort of worked in Firefox and IE. I don't want to be an HTML & CSS expert (in any case I'm not very artistic) but I want to be able to make correct, professional looking sites to go with my PHP code. Since I really enjoyed the nettuts tutorials on CodeIgniter, I looked through their website and came across this tutorial: http://net.tutsplus.com/tutorials/html-css-techniques/html-5-and-css-3-the-techniques-youll-soon-be-using/ It seems like a great intro to good markup practices. My questions: - Are the HTML5 tags supported by most browsers? - Is this tutorial sufficient as an intro to HTML & CSS? - Do you guys know of any great CSS tutorials which go somewhat past the basics? Any other tips, etc. would be appreciated. Thanks!
  4. I was on the fence between CI and Kohana, but I decided to go with CI for now. I see the huge community & great documentation as a big boon. I don't want to waste a lot of time figuring out relatively trivial things (especially since I'm an OO & MVC newbie). Perhaps after I gain a bit of experience I'll move on to Kohana. Thanks again for the replies, they were exactly what I needed.
  5. nafetski: Why do you suggest switching to Kohana? In other words, what can Kohana do that codeigniter can't?
  6. Wow thanks for the excellent replies guys! Just to confirm, when you say don't use a templating system, are you also referring to the built-in templating systems most of these frameworks have? I'm still not 100% sure of which framework is best. I've done a bit of research and the contenders seem to be cakePHP, CodeIgniter, Zend, Symphony and Kohana. I was going to go for CodeIgniter but since both of you are so ardent in respect to Kohana I might reconsider.
  7. Great link, thanks! What are your views on using a framework such as the one I mentioned in my original post? I guess it will make it easier to stick to the principles described in your link. Also, what about a templating system? Should they be used in all but the simplest of projects to separate code from HTML?
  8. Hi. First a little background on myself: I've been coding PHP for a number of years (in fact I worked as a programmer part-time while in college writing PHP applications, although it was used by a small number of people internally). I find that my code isn't very professional, for example I'll have a functions.php and just dump all my functions there, or I'll intertwine HTML with PHP, etc. I've worked with classes a bit, but only the basics. I haven't coded for about half a year, but I'm about to start a project that I want to make as professional as possible (to save myself time and to be proud of my code). I wasn't able to find any articles, etc. specifically related to this. What do you guys suggest? I was thinking of using a framework such as CodeIgniter. Is this a good idea? Input would be much appreicated!
  9. $query = "SELECT * FROM users WHERE username = "{$_POST['username']}""; should be $query = "SELECT * FROM users WHERE username = '{$_POST['username']}'"; So ' instead of " Also your script is vulnerable to SQL injection (http://en.wikipedia.org/wiki/SQL_injection) through the username POST variable
  10. instead of the last loop: foreach ($SVarray as $varName => $varVal) { $$varName = $varVal; }
  11. Hi, I have a script that requires the user to upload a file. The problem is that the files can be big (10mb+). When the user selects a file of this size and clicks submit, the page clears for a few minutes in which time it looks like the page finished loading while it hasnt. Is there any way to display somethign to the user while the file is uploading? Regards
  12. Thanks for the reply. Yeh I have an admin folder and include files, but it still gets messy, for example i will need to add, edit, delete, etc., etc. and i will have a huge amount of if's, etc. Also, a question regarding the customers and producers. I have seen websites with 2 boxes, and if you select and element and click a button it moves it to the other one. I think i could use this to add and remove customers from producers. How would i do this?
  13. Hi, I am currently coding a rather large project which includes an admin panel. Im not a bad php coder but when it comes to larger projects i often have problems. This one includes a producers table, customers, products, users, etc. I made a user system for logging in, editing, etc. The admin panel is a problem. I will need to make a part where the admin can edit producers, edit the customers that are associated with the producer, etc. I could make it but my code wopuld be very messy, etc. Any idea of how to handle/organize large projects like this?
  14. Hey I'm in a hurry so I have to be quick. Basically, to delete rows where the same IP address and companyID combination appear more than 4 times, you could select the first row, then loop through all the other rows, comparing the first row to the ones that are looping. Using a counter, you could count the number of times the first row is equal to the others (in terms of IP address and companyID), if the counter is 4=< you delete it. Then you move onto the second row and do the same thing. This is a very rough idea and you could make it much more effecient, maybe there is also a simple mysql statement that could be of more use (I'm not that great at mysql to know it). Hope I helped.
  15. I jsut started using DBX and am encountering a problem. In my script i make a new class for batabase functions, and within that class I have a connect function, it looks as follows: [code=php:0] class db { var $module = DBX_MYSQL; var $server = "192.168.168.140"; var $username = "web"; var $password = "banga28leiden"; var $database = "comments"; var $dbconn; function connect() { $this->dbconn = @dbx_connect($module, $server, $database, $username, $password) or die("<b>Could not connect to database!</b>"); } } [/code] when I call $db->connect() from my script, it doesnt work, but when I just use the dbx_connect function in my script (and not throught the db class) it works fine. Any suggestions?
×
×
  • 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.