php redirection..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    php redirection..

    hi friends, i am tired of using header or meta tag.. it works fine but when i use $_SERVER[HTTP_REFERER] , it sometimes repeats the same action.. i want an effective redirection.. i want my users to complete an action .. and start from the same place where they left.. i want my user to continue browsing without action completed msg (topic posted successfully) . can anybody guide me for perfect redirection.. somehow tell me how i take my user back to same place after finish action.

    #2
    why u dont use java script or html XD
    http://www.youtube.com/watch?v=vsLkpcFKbOk

    Comment


      #3
      i want it for my xhtml (lavalair) script. .

      Comment


        #4
        use the meta tags its the eaiest way you dont have to show them a message at all
        Creator of
        Epix.Mobi

        Keep an Eye on us Big things coming soon!!!!
        Need something for your site hit me up here

        http://coding-talk.com/forum/main-fo...r-your-wapsite

        Comment


          #5
          mate, meta tag fails sometimes when i use $_SERVER[HTTP_REFERER]

          Comment


            #6
            then dont use it just send them to the page there ment to go to or have a hidden input that tells the header where to redirect to

            PHP Code:
            <input type="hidden" name="redirect" value="chat"
            like that
            Creator of
            Epix.Mobi

            Keep an Eye on us Big things coming soon!!!!
            Need something for your site hit me up here

            http://coding-talk.com/forum/main-fo...r-your-wapsite

            Comment


              #7
              not getting what you wanna say.. be more clear n tell with example if possible.

              Comment


                #8
                thats what i just did
                Creator of
                Epix.Mobi

                Keep an Eye on us Big things coming soon!!!!
                Need something for your site hit me up here

                http://coding-talk.com/forum/main-fo...r-your-wapsite

                Comment


                  #9
                  but nooob to understand.. pls tell how i use this

                  Comment


                    #10
                    Do u mean something like this..
                    PHP Code:
                    $action $_GET["action"];
                    $post $_GET["post"];
                    if(
                    $action=="viewtpc")
                    {
                    if(
                    $post=="yes")
                    {
                    //codes here for inserting topic to the database
                    }
                    //the topics being viewed here
                    //then let's say the page is forum.php..in the form action, put forum.php?action=viewtpc&post=yes

                    My Blog: http://jhommark.blogspot.com
                    My Facebook: http://www.facebook.com/jhommark
                    My Official Site: http://www.undergroundweb.tk
                    My Community Site: http://undergroundwap.xtreemhost.com

                    Comment


                      #11
                      Code:
                      else if($fc=="shout")
                      {
                        $shtxt = $_POST["shtxt"];
                          addonline(getuid_sid($sid),"Roaring","");
                      
                      $pstyle = gettheme($sid);
                            echo xhtmlhead("Roar",$pstyle);
                          echo "<p align=\"left\">";
                          if(getplusses(getuid_sid($sid))<1)
                          {
                              echo "<img src=\"images/notok.gif\" alt=\"X\"/>You should have at least 1 plusses to Roar!";
                          }else{
                            $shtxt = $shtxt;
                          $uid = getuid_sid($sid);
                          $shtm = (time() - $timeadjust) + $timeadjust;
                          $res = mysql_query("INSERT INTO shouts SET shout='".$shtxt."', shouter='".$uid."', shtime='".$shtm."'");
                          if($res)
                          {
                          $shts = mysql_fetch_array(mysql_query("SELECT shouts from users WHERE id='".$uid."'"));
                          $shts = $shts[0]+1;
                          mysql_query("UPDATE hfjgn_users SET shouts='".$shts."' WHERE id='".$uid."'");
                      	 echo "<meta http-equiv=\"refresh\" content=\"0;url=$_SERVER[HTTP_REFERER]\">";

                      like m using meta tag n http server redirect.. but it sometimes repeats action only.. doesnt take user for where they clicked
                      Last edited by icedroplet1987; 10.02.10, 16:10.

                      Comment


                        #12
                        make like a

                        PHP Code:
                        if (!isset($_SERVER['HTTP_REFERRER'])) $referrer $_SERVER['HTTP_HOST']."/index.php?action=main&sid=$sid"

                        Comment

                        Working...
                        X