Jump to content

ldougherty

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Posts posted by ldougherty

  1. I actually just ran into this same issue yesterday.

     

    From what I'm reading no PHP variables will be able to return the parent frame URL but you should be able to use javascript such as window.parent.location.href

     

    I ended up just sending the data I needed to the iframe as a GET variable and then used that in the iframe page as $url = $_GET;

     

    Hope that helps.

  2. Not sure, tried the same on my junk database and it worked perfectly fine.

     

    I'm assuming that downloads is your table name right?  If that is indeed correct then the only thing that comes to my mind is the word INDEX maybe being a unique name.

     

    Try adjusting syntax just for giggles.

     

    DELETE FROM downloads WHERE index < 50000

  3. The equivalent to .htaccess rewrite rules for IIS would be ISAPI rewrites in IIS

     

    You have to purchase the modules and install it on the server but the functionality is the same.

     

    You also have the ability to simply redirect site(s) and file(s) in IIS itself but not using complex algorithms like you do via .htaccess

  4. I have phpMailer working with CC on my centOS server without issue.

     

    http://www.askapache.com/php/phpfreaks-eric-rosebrocks-phpmailer-tutorial.html

     

    Adding Carbon Copy CC Recipients

     

    To carbon copy (CC) recipients you can add them to the E-Mail going out by using the following methods. Just like the Adding Multiple Recipients example, you can add multiple CC recipients as well.

     

    $mailer->AddCC('recipient1@domain.com', 'First Person');

     

    // More than one CC, just keep adding them!

    $mailer->AddCC('recipient2@domain.com', 'Second Person');

    $mailer->AddCC('recipient3@domain.com', 'Third Person');

     

    - - - -

     

    Our working example may be of assistance.

     

    http://www.hostmysite.com/support/linux/programming/phpmailer/

  5. You should just store the datestamp values in your database based off of the server time.  If you need to display these datestamps anywhere on your site you could have a user option of timezone much like forums do which will adjust the date pulled from the database for timezone.

     

    As for not being able to edit after 2 hours, you will just need to have the system do a check of the current datestamp vs the stored datestamp and compare the two values to determine the difference.  If the difference is greater than 2 hours then do not allow the function to run.

  6. Another option is to use the getimagesize function to validate if the file uploaded is indeed an image...

     

    // validation... since this is an image upload script we should run a check 

    // to make sure the uploaded file is in fact an image. Here is a simple check:

    // getimagesize() returns false if the file tested is not an image.

    @getimagesize($_FILES[$fieldname]['tmp_name'])

  7. So the entires in your database follow the format of YYYY-MM-DD HH:MM:SS for example 2009-05-10 11:12:13?

     

    And you want to search using just a date value of 2009-05-10?

     

    If that is indeed the case you can use the LIKE function when searching as such

     

    $date = '2009-05-10';

    "SELECT * FROM date WHERE field LIKE '%$date%'"

     

    This will retrieve all values that include 2009-05-10

  8. I've done something similar... my code is below.

     

      for($count=0;$count<$numcategories;$count++) {
    
        ## If Any Information Changes Update Category Table
        if ($newcat[$count]<>$oldcat[$count]) {
          echo "<b>Change Found: Updating Database</b><br>";
          mysql_query("REPLACE INTO `category` (`id`, `name`, `parent`, `thumbimage`, `displayorder`) VALUES
            ('$newid[$count]', '$newcat[$count]','$newparent[$count]','$thumbimage[$count]','$neworder[$count]')");
        }
    
        echo "<br>";
    
      } # End For Loop
    

     

    The form has a POST element storing the old value and new value for each item on the chart into an array.  Then I use the FOR loop to parse through the array comparing the old and new and updating mySQL when a change is found.

×
×
  • 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.