-
Posts
1,807 -
Joined
-
Last visited
Everything posted by hitman6003
-
Don't click the back button... It's a browser thing, there's nothing you can do server side to prevent it that I know of off hand. The only thing that might work, and I've never tried it, so I don't know, is to set the expire header to some date in the future, rather than the past...however if the user visits the page in the future, but before the expire, and you want them to have updated data, the browser may not display it...it may pull from the cache.
-
How do you determine xp per person and per team?
-
[SOLVED] How to get two keys from array loop?
hitman6003 replied to t_machine's topic in PHP Coding Help
DOH!! -
FF stores them in one place, the "favorites.html" file...I don't think IE does, it stores shortcuts in a particular folder in the user's profile for favorites.
-
set @rank = 0; SELECT team, @rank := @rank + 1 AS rank FROM teams ORDER BY xp DESC;
-
The user can not submit a file to a webpage via ftp...it will always be sent from the user's browser to the web server using http (at least from an html form...of course IE and FF can act as FTP agents, but then the user wouldn't be submitting a file from a form). Once it's been uploaded to the server by the user (via http) the server can ftp it somewhere else if you choose.
-
you have a rogue single quote here: sc, pd.products_name' limit 0, 8 Remove it from your query.
-
http://www.fpdf.org/
-
I think this: $middlerank=(($winner[rank] + $loser[rank]) - 0.5); $new_winner_rank=round(($middlerank / 2) - 0.5); Should be using multiplicity rather than subtraction... $middlerank=(($winner[rank] + $loser[rank]) * 0.5); $new_winner_rank=round(($middlerank / 2) * 0.5); Also, I hope you are intentionally halfing again the "new winner rank" from the middle rank...making the new rank a quarter of the original value.
-
dbillings... The reason you don't do that is because doing so doesn't actually reduce the size of the image. This means if the image of your daughter is 10 MB in size and you decide that the whole world needs to see that image on the front page of your website, then every visitor must download all 10 MB and then the browser reduces the size client side, even if they don't want to see the full size image. If you create a thumbnail, say 100px X 100px, then that formly 10 MB pic is now probably 5k...the users who want to see the full size image can click it and see the large version, everyone else doesn't have to waste their time downloading something they don't need to. Additionally, the browser usually does a crappy job of "reducing" the size.
-
It's not exactly easy...or common place. You will probably want to look at one of the GIS packages available...there are some open source ones listed here: http://opensourcegis.org/
-
SELECT cat_title, count(*) FROM Vendors v LEFT JOIN Category c1 ON v.cat_id = c1.cat_id LEFT JOIN Category c2 ON v.cat_id2 = c2.cat_id LEFT JOIN Category c3 ON v.cat_id3 = c3.cat_id LEFT JOIN Category c4 ON v.cat_id4 = c4.cat_id LEFT JOIN Category c5 ON v.cat_id5 = c5.cat_id GROUP BY cat_title ORDER BY cat_title; I think it'll work...of course I haven't tried it : )
-
Use php to randomly select the table, then use mysql to randomly select a row...I'm assuming that's what you want... $tables = array('table1', 'table2'); $which = array_rand($tables); $result = mysql_query("SELECT fieldname FROM " . $tables[$which] . " ORDER BY RAND() LIMIIT 1") or die(mysql_error()); echo 'Result from table ' . $tables[$which] . ' was: ' . mysql_result($result, 0);
-
An api is simply a set of calls that you put in place in your application to allow others to use it. For example, the digg api allows external users to view diggs as they happen, among other things, via a set of functions that interact with their system.
-
[SOLVED] How to get two keys from array loop?
hitman6003 replied to t_machine's topic in PHP Coding Help
for ($i = 0; $i < count($array); $i + 2) { echo $array[$i] . '<br />' . $array[$i + 1]; } Probably want to put in a check to see if $array[$i + 1] exists...there is a potential for it not to. -
http://en.wikipedia.org/wiki/Api
-
What user controls do you have on your database? If you have permissions all the way down to the column level, or even the table level, for any user, it forces mysql to check those permissions for all users. That can significantly slow down user authentication. Additionally, depending on how you are specifying your connection, it can affect your connection speed. For example, the default connection method for Windows will be TCP/IP, even if you specify "localhost". If you are using shared memory as the connector on windows, it will be much slower than TCP/IP. If you have *nix, then [assuming default settings] the default connection, so long as you put "localhost" as the host name for the db connection, will be named pipes...which is faster than the network...even the loopback interface.
-
I did have that backwords...oops, stupid brain...I meant that only InnoDB supports transactions...sorry for any confusion.
-
Querying mysql database based on values from html form
hitman6003 replied to cutegurl985's topic in PHP Coding Help
Need to put a WHERE in the query... change: if (count($query_parts) > 0) { $query .= implode(" OR ", $query_parts); } to if (count($query_parts) > 0) { $query .= " WHERE " . implode(" OR ", $query_parts); } -
What version of php are you using? That will only work in php >= 5.1 This post may help... http://us3.php.net/manual/en/function.date-default-timezone-set.php#75648
-
How to send email in PHP using arabic language
hitman6003 replied to searchacar's topic in PHP Coding Help
What is the character set for the database? I think arabic is a mulibyte character set, so if the database isn't prepared for it, it will mess up the encoding. http://dev.mysql.com/doc/refman/5.0/en/charset.html -
[SOLVED] HOW to copy the content of a webpage using PHP?
hitman6003 replied to erasam's topic in PHP Coding Help
What do you mean "whole content of a webpage"? You can get the html of a page using the file functions...for example: $html = file_get_contents("http://www.phpfreaks.com"); -
I gave you the wrong function...I think this one would be better: date_default_timezone_set('Europe/Dublin'); http://www.php.net/date_default_timezone_set()
-
So long as it's the same version of MySQL, and you copy ALL of the files, it may work. I've never tried, as whenever I have a need to do something like that, I take the opportunity to upgrade MySQL to the newest version and use mysqldump to export the data, then import it with mysqladmin.
-
Use the setlocale function http://www.php.net/setlocale