Jump to content

vineld

Members
  • Posts

    286
  • Joined

  • Last visited

    Never

Everything posted by vineld

  1. Where do you have it written with decimal point? In the database? I guess you mean 27.5% and not 2.75 in this case?
  2. Does the link display correctly? Check your html code to see which values you print from the database.
  3. The simplexml class will hold the properties of the xml document, no matter what it looks like (as long as it's proper xml). Channel and item is a result of the structure of RSS.
  4. Ok, well, since the user is uploading files there needs to be a form. Here's what seems to be the best solution: 1. Use one single form with several differently named submit buttons 2. Check which submit button was used in the target file 3. Do the analysis depending on 2. Setting up functions for the various analysis methods seems like a good idea, if they do not already exist. You need to add enctype to your form but maybe you already know that?
  5. Since I suspect this is for a school project or something like that you should try to find the solution yourself If it's not then you have some flaws in your code that needs to be corrected as well like the one I pointed out + you need to rethink the whole structure of it. Hint: write an sql statement that selects the (sum of I guess?) right column from the game table.
  6. Just write some numbers above 1100 and see what happens. I don't really know what the point of it is though? :-\ You will not GET a total score but what the code does is that it updates the total score depending on the value of the $gp variable. That is some badly structured code btw. What's funny about it is that $newlevel can never be set to "doublesmetalaxeplus": if($gp>=14139) { $newlevel="doublesmetalaxeplus";} if($gp>=8438) { $newlevel="doublessilveraxe";} if($gp>=10482) { $newlevel="doublessilveraxeplus";}
  7. Are there actually any forms? If not then using them for simple links is not really good semantics.
  8. I suppose you may be looking for more than one occurrence of the tag? If so, you would want to use preg_match_all instead.
  9. Whether you would want to hire people or do the job yourself all depends on the situation but no matter what you probably want to be able to judge the result. The frameworks are of course slightly less time consuming to learn than PHP itself although you still need to understand how it all works in order to make the most of it. The main reason why I am not fond of frameworks myself is that they are usually poor performance wise compared to basic PHP and is never an option for larger systems. We should all care for the environment as well.
  10. Changing the doctype is just avoiding the issue and not a solution. Of course I have run it through a validator. I know what the problem is (block-level and inline elements), and so do most of you I assume, but I still need to find a neat solution that would preferably not include JS.
  11. No, you're wrong, it is always an array (at those times when it's set that is...).
  12. I think there is something wrong with your underlying logic behind this code. The switch seems unnecessary as suggested. What is it exactly this page is supposed to do?
  13. Actually I think you answered your own question there. The prepared statements should offer greater speed / better performance. I found this article as well over at Zend which says: However, regarding speed it would be nice to see some actual test results. I am certain the prepared statements offer greater speed though.
  14. You should definitely redesign your database structure. You should store tags in a separate table. This will prevent such horrific queries.
  15. Don't ask the same question in two different threads....
  16. You have no variable called $row['COUNT(rating)'], change that first of all.
  17. Since I have always been used to the usual mysql I have not used mysqli until now but I read that it is to be preferred these days. Is that true? If so, why? Are there performance improvements or just better functionatlity with OOP?
  18. Do print_r[$_POST] to check if it contains your values or not. It MUST be your php code that is wrong since the form isn't.
  19. Don't use session_is_registered(), it is deprecated. Use isset($_SESSION['name']) instead. Also, session_is_registered does not accept anything else but a single string. Check the PHP documentation before using functions that you are uncertain of.
  20. That will do. If this is part of your own application you should however see to that all values are correct when inserted instead of ending up with this duct tape solution. Every little thing that speeds up your applications will save time, money and the environment.
  21. What does your code look like? Do you display it on a web page or in a textarea or somewhere else? User mysql_real_escape_string for security.
  22. I guess you already have some code ready? Go from there, I don't quite understand the details of what you wish to accomplish. You will need to find a formula to calculate the points and then update the corresponding tables.
  23. Is the year not included? Why that format? How do you know which year it is? Since that is not a valid datetime format I think you will have to write a regular expression and perhaps insert the (current?) year inbetween month and time, then convert it.
×
×
  • 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.