Jump to content

crouchjay

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

crouchjay's Achievements

Member

Member (2/5)

0

Reputation

  1. The process works in such, that when the user decides to crop an image, it gets stored in tmp.  The cropped image is displayed, where they have the choice of either NEW IMAGE, RECROP, SUBMIT Here is the code for recrop selection [code]if ($_POST['recrop']) { unset($display); unset($image);             //Path to image             $imgfile=$_REQUEST['display'];             //Image Name             $image=$_REQUEST['imgfile'];             //Delete cropped image             unlink($imgfile); } //If Image name found get Original Image if($image != "") $display="userImages/$username/largeVersion/".$image; //goto image crop html page include_once( "HTML/createProfileImage.html" ) [/code] So the original cropped image gets deleted from the file system, this has been proved, but after the second recrop of the image the original still displays until the refresh button is pushed. If there is any more code you want to see just let me know. Thanks Jay
  2. On a portion of my site the user is able to crop the images to liking, but the cropped image stays when trying to recrop the same image, but when I press the refresh button the newly cropped image replaces the previous cropped image.  How do I fix this?  Jay. Thanks a lot for the help.
  3. I am trying to delete all users from table usersonline after 30 minutes of inactivity.  The query runs, but nothing happens.  How else can I approach this? Thanks in advance Jay. [code]$query="SELECT * FROM usersonline WHERE DATE_SUB(NOW(), INTERVAL 30 MINUTE) <= LastTime";[/code]
  4. How do other sites take care of this problem? Do I need to create a deamon that checks connectivity of users every so often?
  5. I have a table for users that are currently online, how do I set them offline if they click the close browser button? Can I retrieve this action? Thanks for your help?
  6. You need to install GD 2.0 Don't worry this is very easy. You can look for instructions on the official page. Don't have it right now, but you can google it. Basicly, You find the code snip in php.ini.recommend and unmark it. <- forget the actuall word describing the action so it will look like this -> extension=php_gd2.dll instead of -> ;extension=php_gd2.dll Jay
  7. Found the problem, I am stupid. I had already moved it, I needed rename().
  8. Thanks, but unfortunately that didn't work. I also tried changing the slashes around but that didn't help either. [code] $image=new Image(); $file=$_FILES["imgfile"]['type']; $ext=$image->verifyImage($file); if(strlen($ext)>4){echo $ext; exit();}//Display error message, needs to be finished $filename='temp_img'.$ext; $image->setFilename($path_username_temp.'\\'.$filename); $error=$image->uploadImage("imgfile", $path_username_temp, '\\'.$filename); $success=move_uploaded_file($_FILES["imgfile"]['tmp_name'], 'C:\Apache2\htdocs\GP2\imageEditing\\'.$_FILES["imgfile"]['name']); if($success==false) echo "false"; else echo "true"; [/code] This is what the code looks like around it. The rest works as intended. Jay
  9. [code]$success=move_uploaded_file($_FILES["imgfile"]['tmp_name'], 'C:\Apache2\htdocs\GP2\imageEditing\\'.$_FILES["imgfile"]['name']);[/code] I have WINDOWS OS and all file directory names are correct. It returns false. Please help Thanks. Jay.
  10. I have created a value and want to post it on the next page so: [code]$value=$_POST['value']; <input type="hidden" name="<?php echo $value; ?>" /> url...?value='.$value.'[/code] but when I put the cursor over the link the value is shown blank, but I know there is a value there. Is this the correct sequence of steps if you want to save a value to use later? Jay,
  11. I want to create a new row of data, but I need the query to return the newly created rowID. How do I go about doing this? Jay,
  12. I am not sure how others due it or if there is a simplar way but you can go "DESCRIBE table" And that will return +--------------------------------------------------------------------+ | Field | Type | Null | Key | Default | Extra | +-------------+---------+----+------+---------+------------------+ | id | int(11) | | PRI | | auto_increment | +--------------------------------------------------------------------+
  13. MySQL or maybe MyISAM table does not except the latter value. How do I get around this? $x="Dont Care" $y="Don't Care"; INSERT INTO table SET column = '$x' <----inserts INSERT INTO table SET column = '$y' <----Does not insert
  14. Thank you. Cleared up the problem.
×
×
  • 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.