posting form to self with data display !!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tamimmakki
    New Member
    • Nov 2007
    • 6

    posting form to self with data display !!!

    Hi guys,
    I am new to php. can you tell me how can we post a form to same page and display to posted data on the same page with form. Actully i need a form if i submit it i want the submitted data displaying on the same page and i want to submit a new data with the same behaviour.
    my second question is is there anyway if i can use a global variable in php for all web pages of my web site. As we do in ASP in global.asa
    I need a global variable that holds some value and i need to access it on another page
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Originally posted by tamimmakki
    Hi guys,
    I am new to php. can you tell me how can we post a form to same page and display to posted data on the same page with form. Actully i need a form if i submit it i want the submitted data displaying on the same page and i want to submit a new data with the same behaviour.
    my second question is is there anyway if i can use a global variable in php for all web pages of my web site. As we do in ASP in global.asa
    I need a global variable that holds some value and i need to access it on another page
    Hi,

    to answer your first question you need to look at $_GET and $_POST.
    To answer your second question, there is a way to do that, you need to look at $_SESSION.

    Hope this help, get back to me if you need more help.

    Cheers

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Originally posted by MarkoKlacar
      Hi,

      To answer your second question, there is a way to do that, you need to look at $_SESSION.

      Hope this help, get back to me if you need more help.

      Cheers
      Or a cookie :)


      mmmm cookies.

      Comment

      • MarkoKlacar
        Recognized Expert Contributor
        • Aug 2007
        • 296

        #4
        Originally posted by markusn00b
        Or a cookie :)


        mmmm cookies.
        hehehe, I know they're tasty but as good as everyone (new to php or not) have heard of them. That's why it's also worth taking a look at the $_SESSION and getting familiar with it.

        Cheers

        Comment

        Working...