1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need a little Redirect help here

Discussion in 'PHP' started by danjapro, Mar 16, 2010.

  1. #1
    I have this Code in an upload request. Upon completion I want to Re-direct to a specific link

    How would I write that in here???
    
              $this->_debugoutput .= JText::_('JGS_ALERT_PICTURE_SUCCESSFULLY_ADDED') . '<br />';
              $this->_debugoutput .= JText::sprintf('JGS_NEW_FILENAME', $newfilename) . '<br /><br />';
    
              $this->_mainframe->triggerEvent('onAfterJoomUpload', array($row));
            }
          }
          else
          {
            $this->_debugoutput .= JText::_('JGS_ALERT_INVALID_IMAGE_TYPE');
            continue;
          }
        }
    
        echo $this->_debugoutput;
    
        JHTML::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
    
    Code (markup):
     
    danjapro, Mar 16, 2010 IP
  2. Imozeb

    Imozeb Peon

    Messages:
    666
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this:

    PHP code:
    $this->_debugoutput .= JText::_('JGS_ALERT_PICTURE_SUCCESSFULLY_ADDED') . '<br />';
              $this->_debugoutput .= JText::sprintf('JGS_NEW_FILENAME', $newfilename) . '<br /><br />';
    
              $this->_mainframe->triggerEvent('onAfterJoomUpload', array($row));
    [COLOR="blue"]header("Location: http://www.yoursite.com/folder/file.php");[/COLOR]
            }
          }
          else
          {
            $this->_debugoutput .= JText::_('JGS_ALERT_INVALID_IMAGE_TYPE');
            continue;
          }
        }
    
        echo $this->_debugoutput;
    
        JHTML::addIncludePath(JPATH_COMPONENT.DS.'helpers'.DS.'html');
    Code (markup):
     
    Imozeb, Mar 16, 2010 IP
    danx10 likes this.