Jump to content

vineld

Members
  • Posts

    286
  • Joined

  • Last visited

    Never

Everything posted by vineld

  1. You simply set up a normal login system with various privilege levels which are then assigned to the users. Or did you mean that each user is to have a unique page?
  2. That's kind of the basics of creating a calculator. You need to parse the string. This is usually done in beginner's programming courses at university over here (Sweden).
  3. Thanks for your two cents. I think I'll stick with just using the text as a link since it doesn't really matter. What you said is not entirely true though. Even though the Googlebot can't execute javascript it does at times read javascript and might take that into account depending on the situation.
  4. Yup, which might be a good idea when you include a file that's absolutely crucial to your application and whose absence might have unpredictable results.
  5. The old code is messy, output by php with inline css and therefore not very reader friendly. That was why I opted against displaying it in the first place. I don't really wish to replace any elements as they seem to be fairly logical as they are. I think I will go for this solution nonetheless: 1. Add a JS onclick link to the surrounding div for the link. 2. Add two separate html links for an image and a header which are the only relevant items for the target url itself. This is really turning into SEO now I guess... Sorry about that. Would this solution be a good idea do you think or will the search engines frown upon this? After all, it may seem strange with two links for the same page and then a js link that surrounds them...?
  6. What I am thinking is this: 1. The operations f1 + 1, f2 = f2 + 7 will have to be done first. 2. f3 will then have to be calculated using the two first fields. The question is really this one: Is this particular row locked while doing all three operations and will the last one always be done last in a query?
  7. Haha I'm not sure if that was a joke or just plain sarcastic The problem is actually very straight-forward. I need to use a block-level element as a link in an SEO friendly manner. Although I know that is not a good idea, that is how the code looks today and it's not really my fault.
  8. You have two other options as well - require and require_once.
  9. Remove the semicolon from the while row. And why do you use extract?
  10. ALWAYS post the error message. That way it will make it much easier to spot the problem. Simply saying "what's wrong with my code?" is like asking someone to help you look for your keys in your entire home town when you know they're in your house...
  11. You can not set the session variable prior to your check, then you will never shuffle since it will always be set
  12. There are plenty of log in tutorials available. Try Google. Try looking at a few to understand the logic behind them. Not all are good for every situation and you may wish to adjust them slightly.
  13. You need to loop through the result. Now you just pick the first one. while ($item_row = mysql_fetch_assoc($get_items)) { do what you want }
  14. If you simply print html that way it will not be appended to your table, unless you mess up your html completely that is You need to produce and evaluate javascript instead. So it's not really a php issue.
  15. First of all, don't set the record creation time manually (if you actually do so, as you wrote earlier). Instead, use one single field where you store either a datetime or unix timestamp (faster). This will give you much freedom to do as you please with the data later on. You may still wish to store year and month in two separate fields but then use integers instead since it is both faster and more relevant.
  16. Unless the user is logged in you might want to identify the visitor by setting a session variable upon the first visit. That way you can recognize him / her by checking for the session variable and if it is set, don't reshuffle the array.
  17. Semicolons after if should not produce any errors though. What is the error message?
  18. Exactly. Just one question, why do you store these variables manually and why as varchars? That doesn't seem like a good solution.
  19. Too much to read for anyone... Do you get any error messages? What does the code produce? Try tracking where it goes wrong by printing strategic values.
  20. A switch wouldn't be much better, the whole logic needs to be rethought.
  21. Perhaps I misunderstood you. Of course you not user "2.75%" in calculations and you must not store the value that way in the database but you may display if on your pages in any format you wish. Whether you store it as 2.75 or 0.0275 doesn't really matter, you can do format them in anyway you like when producing html output.
  22. I always log the IPs in various situations anyway in order to make for example admin areas safer and to stay on the watch for attacks and for a few other purposes but I don't like the idea of using it to directly restrict access for regular users since it imposes several problems. The issue is not really the log in itself which should be secure enough (I always use sha1 and double salts) but mainly the session handling. The way the system is built currently someone might be able to rob the user of its session and pose as them although it is not that likely I guess. What do you mean by hashed cookies btw? I can't really hash the session id? Well, I guess I could but what would be the point? As long as I steal the cookie it doesn't really matter what format the data has as I will still be identified as you?
  23. Then you will have to adjust your calculations though so that you don't multiply with the number of percents. That will get expensive
  24. Exactly what is it that you don't understand? The structure of xml and rss or objects and classes? That's kind of two very different things
  25. You're using assignment (=) instead of the equal to (==) operator which will make your statement true every time.
×
×
  • 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.