Jump to content

golem

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

golem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, but I want to keep the image size(HxW) but reduce file size - image quality.
  2. hi How can I uplaod a large image (say 2MB) and resize it on the server to (say 50k)? Thanks
  3. Thanks but I can't get it to work. its working with two tables: " SELECT users.name, users.phone, users.email, user_books.bookTitle, user_books.bookPrice, FROM users, user_books, user_hats WHERE users.login = '$login' AND users.password = '$pw' AND user_books.user_id = '$userID' ";
  4. Hi , I try to get data from tehree tables. any reason why this does not work? (All the php variables are OK) Thanks! " SELECT users.name, users.phone, users.email, user_books.bookTitle, user_books.bookPrice, user_hats.color, user_hats.pattern FROM users, user_books, user_hats WHERE users.login = '$login' AND users.password = '$pw' AND user_books.user_id = '$userID' AND user_hats.user_id = '$userID' ";
  5. Hi, How can I compress an image that the user upload to te server. If the user is uploading a 2mb image, I want to compress it to 200k. any ideas? ??? Thanks
  6. It will still need to go through all the records to check who is online... will that be heavy on server resources, if lets say I want to check every 1 min?
  7. Thanks for your answer. If I understand right, if I have a database of 50000 users, I will have to go through all of them periodicaly and compare current time with timestamp stored in the database from last activity? .
  8. Hi, How can I run a logout script when a user close the browser. This is for a login/registratin system, to change a flag in teh database from "online" to "offline" if user closes the browser without loging out. Thank you.
  9. :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* :-* [b][color=red]THANK YOU![/color][/b]
  10. HI , I try to store an array in MySQL db. here is whay I Do: ---------------------------------------------------------------------------------------- function insertArray($sArray){ //------($sArray is an array with 3 strings: "One","Two","Three" ) //db connect stuff... include("config.php"); //connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass); // select the database mysql_select_db($database); // //serialize the array                 $DB_array = serialize($sArray); $user = "user1"; //update the db $query = mysql_query("UPDATE $table SET location = '$DB_array' WHERE username = '$user'"); // get the array from db $query = mysql_query("select location from $table where username = '$user'");                 // get the 'location' field $field = mysql_fetch_row($query); //if I try return here:  return $field      I get:      a:3:{i:0;s:3:"One";i:1;s:3:"Two";i:2;s:5:"Three";}                                 //unserialize the 'location'  field $return_array = unserialize($field);                                 return $return_array;   } ------------------------------------------------------ If I look in the db, the 'location' field has a serialized looking string: a:3:{i:0;s:3:"One";i:1;s:3:"Two";i:2;s:5:"Three";} if I return $field I get this same string, but when I try to unserialize it it fails.... I NEED HELP!!!! ???
  11. hi, new to php. what is "->" means in php? examples: if($form->num_errors > 0){   echo "?"; } and if($session->logged_in){   echo "x?"; { thanks
×
×
  • 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.