Announcement

Collapse
No announcement yet.

Sessions

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

  • Sessions

    can i know hot to make a sessions appear when user click on a page like

    index.php?session=gjagdyaw232323232&page=test
    index.php?session=gjagdyaw232323232&page=test2
    index.php?session=gjagdyaw232323232&page=tet3

    pls help me thanks

  • #2
    What are you asking?
    How to make a session or how to put it in the link?

    Comment


    • #3
      cool. this is related to something i'm trying to get workig.

      i'd like to know how to create a session for a link i place on another website. for example i want to post a link to a poll and want to either create a new session id for the user or pick up their existing session if they've been to my site before.

      makes sense?

      thanks

      chris

      Comment


      • #4
        Originally posted by Max Albert
        What are you asking?
        How to make a session or how to put it in the link?
        how to put it in the link

        Comment


        • #5
          put it in the link...

          If your using PHP to print the link:
          echo "<a href='my.php?session=$sid'>my link</a>";

          If your nesting PHP in a predomately HTML page:
          <a href='my.php?session=<? echo $sid; ?>'>my link</a>


          montybug,
          I'm lost...
          Are you trying to transfer sessions between domains/sites?
          The second half of resuming sessions sounds like you need a cookie.

          Comment


          • #6
            Originally posted by Max Albert
            put it in the link...

            If your using PHP to print the link:
            echo "<a href='my.php?session=$sid'>my link</a>";

            If your nesting PHP in a predomately HTML page:
            <a href='my.php?session=<? echo $sid; ?>'>my link</a>


            montybug,
            I'm lost...
            Are you trying to transfer sessions between domains/sites?
            The second half of resuming sessions sounds like you need a cookie.
            hmm, that is it. really sorry to make u so confuse of what i am trying to say =p

            have a nice day and thanks once again =p

            Comment


            • #7
              it's the same site but a different page.

              what i'm trying to do is have a link to vote on a poll on my main opening page and i'm having problems assigning a session id to the parms i pass to poll.php.

              here's a stripped down version of the code -

              Code:
              <form action="poll.php" method="get">
              <input type="hidden" name="action" value="pollvote">
              <input type="hidden" name="pollid" value="1">
              <b> does this poll work?</b></font></td>
              <input type="radio" name="optionnumber" value="1">
              <input type="radio" name="optionnumber" value="2">
              <input type="submit" name="Submit" value="Vote">
              <p>
              <a href="poll.php?action=showresults&pollid=1">View Results</a>
              </form>
              any idea how to get get a session id for the vote? or is it even needed? i originally had a hidden variable for this but removed it because i had no idea how to set it.

              when i click on vote i get the following here - [b]The action you have attempted could not be performed as your session appears to be invalid. Click the below link to attempt this action again with a new session. [b]

              thanks

              chris

              Comment


              • #8
                If you just want to put the s=sgd0943t0gfds into the form just use a hidden input.

                PHP Code:
                <form action="poll.php" method="get">
                <input type="hidden" name="s" value="<?=$sid?>">
                <input type="hidden" name="action" value="pollvote">
                <input type="hidden" name="pollid" value="1">
                <b> does this poll work?</b></font></td>
                <input type="radio" name="optionnumber" value="1">
                <input type="radio" name="optionnumber" value="2">
                <input type="submit" name="Submit" value="Vote">
                <p>
                <a href="poll.php?action=showresults&pollid=1">View Results</a>
                </form>

                Comment


                • #9
                  thanks for the help. i tried it and VB still had a problem with the session id. here's the URL it generated -

                  Code:
                  mydomain.com/testforum/poll.php?s=%3C%3F%3D%24sid%3F%3E&action=pollvote&pollid=1&optionnumber=2&Submit=Vote
                  notice all the % stuff. i'm assuming the id maybe correct but has been converted to use hex or something similar for some strange reason.

                  i can also see an 's=' as well as a 'sid' in the string.

                  oh! and here's the error message again -

                  The action you have attempted could not be performed as your session appears to be invalid. Click the below link to attempt this action again with a new session.
                  does this form have to be in a php file or can i just insert it into a std html file? i've tried both, when i rename my html document to php the sid is left blank and all i see is "s=".

                  any thoughts?

                  this thing is driving me crazy

                  thanks again

                  chris

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X