Loading ...
Sorry, an error occurred while loading the content.
 

Re: [phpXperts] newbie question

Expand Messages
  • kajol abc
    hi, you can redirect to other page by using header() function in php or  window.location= in javascript. if u count the number of user then u can use mod(%)
    Message 1 of 5 , Jun 29, 2009
      hi,
      you can redirect to other page by using header() function in php or  window.location='' in javascript. if u count the number of user then u can use mod(%) to redirect the visitor to his destination page.

      --- On Mon, 6/29/09, redalice734 <redalice734@...> wrote:

      From: redalice734 <redalice734@...>
      Subject: [phpXperts] newbie question
      To: phpexperts@yahoogroups.com
      Date: Monday, June 29, 2009, 12:22 AM

      I'm trying to write a script that, on click, will call the number of visitors from a counter and redirect the visitor to a page based on which # they are: visitor 1 goes to page a, visitor 2 goes to page b and so on. There are only 4 pages, so it needs to loop.

      Before I was clear on what was needed, I had originally written an array in javascript that would call the pages up randomly but that's not what the customer wants. Frankly, I'm pretty darn lost; I've never done any coding in php before, only javascript. I have a database set up and I think I can work out a decent counter script, but I don't know how to get javascript to call the php results. Any pointers or even a clue would be helpful.

      Thanks in advance,

      -d


    • maSnun
      I m also on mobile. You can use a text file to count the visitors. And use the header function of php to automatically redirect users.
      Message 2 of 5 , Jun 29, 2009
        I'm also on mobile.

        You can use a text file to count the visitors. And use the header
        function of php to automatically redirect users.

        <?php header("Location: page3.php "); ?> would redirect the user to page3.php.

        --
        Abu Ashraf Masnun
        Grad Student, BBA,
        Khulna University.
        http://masnun.com
      • Dora A. Badger
        Awesome, thanks!  ... From: kajol abc Subject: Re: [phpXperts] newbie question To: phpexperts@yahoogroups.com Date: Monday, June 29,
        Message 3 of 5 , Jun 29, 2009
          Awesome, thanks! 

          --- On Mon, 6/29/09, kajol abc <pothik_123@...> wrote:

          From: kajol abc <pothik_123@...>
          Subject: Re: [phpXperts] newbie question
          To: phpexperts@yahoogroups.com
          Date: Monday, June 29, 2009, 6:07 AM

          hi,
          you can redirect to other page by using header() function in php or  window.location= '' in javascript. if u count the number of user then u can use mod(%) to redirect the visitor to his destination page.

          --- On Mon, 6/29/09, redalice734 <redalice734@ yahoo.com> wrote:

          From: redalice734 <redalice734@ yahoo.com>
          Subject: [phpXperts] newbie question
          To: phpexperts@yahoogro ups.com
          Date: Monday, June 29, 2009, 12:22 AM

          I'm trying to write a script that, on click, will call the number of visitors from a counter and redirect the visitor to a page based on which # they are: visitor 1 goes to page a, visitor 2 goes to page b and so on. There are only 4 pages, so it needs to loop.

          Before I was clear on what was needed, I had originally written an array in javascript that would call the pages up randomly but that's not what the customer wants. Frankly, I'm pretty darn lost; I've never done any coding in php before, only javascript. I have a database set up and I think I can work out a decent counter script, but I don't know how to get javascript to call the php results. Any pointers or even a clue would be helpful.

          Thanks in advance,

          -d



        Your message has been successfully submitted and would be delivered to recipients shortly.