Ken2k7
Members-
Posts
5,196 -
Joined
-
Last visited
Never
Everything posted by Ken2k7
-
Code behaves differently when it's incorrectly written. The fact it works doesn't mean it's correct. So no, I don't know. As for the color palette, I'm sure you can add more to it. I haven't looked through your mess to say how though. Post up the relevant bits.
-
Add single quotes to onclick="showPalette('palette')" Also, add a check. function showPalette(Click_Menu) { Click_Menu = document.getElementById(Click_Menu); if (!Click_Menu || !Click_Menu.style) return; if (Click_Menu.style.display == "none") { Click_Menu.style.display = "block"; } else { Click_Menu.style.display = "none"; } }
-
Okay, a few things: $csql1="UPDATE 'games' SET counter = '$counter' WHERE gid = '$gid'"; Don't put single quote around games. It's a table name, not a string. $counter=$ccolumn['counter']; $ccolumn is not defined. Also, your code is redundant. Just run: mysql_query("UPDATE games SET counter = counter + 1 WHERE gid = '$gid';") or trigger_error(mysql_error()); No need for all the checks. That will add 1 to counter.
-
Oh, use this: buildPopup_HtmlCode(390, 329, '<img src="' + html_code + '" alt="" />', '<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" target="_blank">' + html_code + '</a>);
-
If you're using C#, then just add an OnClick otherwise, you need AJAX.
-
Hmm... no idea. I sure hope you don't think we're psychic because I hate to disappoint you. Please post up the relevant code snippets.
-
What difference would that make? You can easily add a new column called "ordering" if you want to order them in a particular order. You can still do it using UNION. Just select the first 2 in descending order, then UNION it with the rest ordered by descending.
-
What does that function return? Also, what's $poll? And please do not use PHP short tags.
-
Use an if statement? Or a ternary?
-
Why not check in the SQL? $users_result = sprintf("SELECT userId FROM persinfo WHERE cat_id = 1 AND userId = '%s';", mysql_real_escape_string($in_userId));
-
That is just a bad idea. Use an array or something. But if you must, ${"var".$variable}.
-
$x = sizeof($arr); while(--$x > 0) echo $arr[$x];
-
I just took a glance and didn't bother reading all of it. But what exactly is not working. Because that really doesn't make sense. Does it do nothing or something undesired?
-
Put the file outside of www root.
-
Usually when you need to count up a set.
-
You should add an alt attribute to img.
-
Again, please do not post any code that are not relevant to the problem, like that PHP class file. If I haven't helped you earlier, I would have no idea what that class does or why you posted it. It doesn't help us help you if you post up more code that are not of any relevance. You shouldn't have JavaScript be a validation to get into a page. It just doesn't work, period.
-
Do you need GROUP BY then? Why not just ORDER BY groupname DESC, mydate DESC, lastname DESC?
-
You can store the values in an array like this: $a = array( 'product1' => array( 'price' => '5.50', 'shipping' => '10.40' ), 'product2' => array( 'price' => '10.00', 'shipping' => '.10' ), ... ); // keeps track of the total price $price = 0; // keeps track of the total shipping $shipping = 0; // then loop foreach ($a as $key => $value) { $price += $value['price']; $shipping += $value['shipping']; } echo sprintf("Price: %s<br />Shipping: %s<br />", $price, $shipping);
-
Doesn't make sense because for one, CURRENT_DATE() should be already be greater than last_voted, so adding 12 hours to it doesn't do anything. I think you want to subtract or add 12 hours to last_voted. But your logic is off.