-
Posts
1,807 -
Joined
-
Last visited
Everything posted by hitman6003
-
The user's session (which one belongs to them) is tracked via a cookie, unless you explicitly turn that action off in php.ini.
-
Unless you are on the same network, like Thorpe said, you will have to upload the file, however, you don't have to store it (i.e. use move_uploaded_file to move it to the uploads directory). Use use file_get_contents on the tmpname... echo file_get_contents($_FILES['Filedata']['tmpname']); The file will be destroyed once the script finishes execution.
-
If they just navigate away, you can't do anything...you can set the expire time for the session to something rather low, but then if they are reading an article or something, and they're a slow reader, they could get logged out. If they close the browser, it will destroy the cookie, and consequentially the session.
-
Uploader working fien with images but not .mov files
hitman6003 replied to chelnov63's topic in PHP Coding Help
What is the max upload file size set to in php.ini? Additionally, I think that if it takes longer than php's max execution time to upload the file it will error. -
echo $_SERVER['PHP_SELF']; http://www.php.net/reserved.variables#reserved.variables.server
-
[SOLVED] How do you abort a while loop if a condition is met.
hitman6003 replied to DeepakJ's topic in PHP Coding Help
http://www.php.net/break -
http://www.php.net/session_destroy
-
http://www.php.net/substr
-
More like strings, rather than individual words or characters.... //english lanugage file $page_title = "This site's name"; $welcome = "Welcome to our site!!"; $goodbye = "Thanks for visiting!!"; //gibberish language file $page_title = "alksdjffweiu laksjfd a"; $welcome = "alksjdf oiweurn ba"; $goodbye = "lawieurw ksnwopiu"; Your php file: <?php include("./languages/english.lang.php"); //or gibberish.lang.php, etc ?> <html> <head> <title><?php echo $page_title; ?><?title> </head> <body> <?php echo $welcome; ?> Blah <?php echo $goodbye; ?> </body> </html>
-
That is correct. You would use a many-to-many relationship.
-
$query = "SELECT * FROM productid WHERE invoice_num IN('" . implode("', '", $arrayelements) . "')"
-
You can't translate from one language to another directly. The way that other sites have multiple languages is by providing a "language file" that contains variables for each text display, then depending on which language file is included, it sets those variables to the language, which is then displayed.
-
<?php $lastTime = "2007-05-18 07:43:22"; $currentTime = "2007-05-18 08:43:22"; echo date("Y-m-d H:i:s", strtotime($lastTime) + (floor( (strtotime($currentTime) - strtotime($lastTime)) / 2) ) ); ?>
-
<form action="upload_file.php" method="post" encypte="multipart/form-data"> enctype is spelled incorrectly
-
http://www.google.com/search?source=ig&hl=en&q=php+blog&btnG=Google+Search
-
http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
See the unescaped single quote in the middle there? Use mysql_real_escape_string on each of your variables before putting it into the final query string. http://www.php.net/mysql_real_escape_string
-
What's the full text of the query that's failing?
-
having trouble creating a password-protected page. Help?
hitman6003 replied to Dionket's topic in PHP Coding Help
http://www.phpfreaks.com/tutorials/78/0.php -
MySQL. The file will be faster at first, but as it grows in size it will get more cumbersome to use. Every time it gets written to the OS has to open the whole file, then append to it, then close it. If that file is several MB in size, then that can eat system resources. Additionally, you will encounter a problem with file access...what happens when PHP, which is multi threaded, tries to access that file with 2 or more of it's threads at the same time? Additionally, using the file makes it much much slower and more difficult to do the associations when you want to look at the history for a particular piece of content or user. You are already going to have to use a join in your user table to get the user name when you are doing a "history", so, rather than having to read your file, then pull the relevant information, you can do a single query with a join.
-
You have a primary key (or unique index) on that column...which prevents it from inserting further records. Change your PK to a different column, or eliminate the unique index (a PK is a type of unique index)
-
Did you try google? http://www.google.com/search?source=ig&hl=en&q=xbox+live+api&btnG=Google+Search
-
[SOLVED] How to Remove Http header xml stream
hitman6003 replied to smilesmita's topic in PHP Coding Help
I'm assuming you are using a socket to read the data...look for "\r\n\r\n", then separate it there. -
When you say "stops inserting data into the server" do you mean, the queries fail, or it stops processing data? Change $results = mysql_query($sql); to $results = mysql_query($sql) or die(mysql_error());
-
There isn't a specific function to find what you want, you'll have to loop through the array... <?php $arr[342]=34; $arr[235]=55; $arr[164]=64; $arr[766]=4; $key_to_find = 164; $cnt = 1; while ($values = each($arr)) { if ($values['key'] == $key_to_find) { $place = $cnt; break; } $cnt++; } echo $place; ?>