vineld
Members-
Posts
286 -
Joined
-
Last visited
Never
Everything posted by vineld
-
Does the link display correctly? Check your html code to see which values you print from the database.
-
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.
-
How to run different code based on which button is clicked?
vineld replied to MetalSmith's topic in PHP Coding Help
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? -
Help in update script! urgent (Sorry for other wrong post)
vineld replied to RootDev's topic in PHP Coding Help
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. -
Help in update script! urgent (Sorry for other wrong post)
vineld replied to RootDev's topic in PHP Coding Help
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";} -
How to run different code based on which button is clicked?
vineld replied to MetalSmith's topic in PHP Coding Help
Are there actually any forms? If not then using them for simple links is not really good semantics. -
You do know about hexdec()?
-
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.
-
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.
-
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.
-
[SOLVED] hi guys I am getting this undefined variable error
vineld replied to co.ador's topic in PHP Coding Help
No, you're wrong, it is always an array (at those times when it's set that is...). -
[SOLVED] having an undefined index on line 465 help please
vineld replied to co.ador's topic in PHP Coding Help
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? -
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.
-
How can I reduce this query and use a 1 column tagging system.
vineld replied to netstormx's topic in PHP Coding Help
You should definitely redesign your database structure. You should store tags in a separate table. This will prevent such horrific queries. -
[SOLVED] having an undefined index on line 465 help please
vineld replied to co.ador's topic in PHP Coding Help
Don't ask the same question in two different threads.... -
[SOLVED] hi guys I am getting this undefined variable error
vineld replied to co.ador's topic in PHP Coding Help
You have no variable called $row['COUNT(rating)'], change that first of all. -
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?
-
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.
-
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.
-
[SOLVED] Check for a word and insert a word if not there.
vineld replied to lynxus's topic in PHP Coding Help
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. -
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.
-
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.
-
change this Sun 26th Jul 11:20 PM into this date
vineld replied to Danny620's topic in PHP Coding Help
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.