Passing values from one page to another

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Passing values from one page to another

    Hello all,

    [snip]

    --------------------------------------------
    //Page0.php
    <a href="page1.php?empid=1">Enter</a>
    --------------------------------------------

    --------------------------------------------
    //page1.php
    <script language="javascript">
    function submitform()
    {
    //Check for empty values in text box
    }
    </script>

    <form onsubmit='return submitform()' method=POST action='page2.php'>
    <input type=text name=uname >
    <input type=hidden name=empid value=<?php echo $empid;?>>
    </form>
    <?php
    echo $empid;
    ?>
    --------------------------------------------


    --------------------------------------------
    //page2.php
    <?php
    echo $empid;
    ?>
    --------------------------------------------
    In page 1 I am able to get the value 1 of empid.
    But in page 2 I am not able to get it.
    Any solutions

    -murugesan
    Murugesan Guest

  2. Similar Questions and Discussions

    1. Passing values to a headerRenderer
      I've found myself in a position where I need to dynamically add content to the headerRenderer of a datagrid depending on the column header. As a...
    2. Passing List Values
      Hi, I have a long list of email addresses and I need to pass it to the next page. Say: <cfform ... action="Page1.cfm?mList=#mListVal#> When I...
    3. Passing values from web page to php script
      Hi Everyone, First excuse my language and the way I explain things. I try to be clear enough. I do have a simple system that processes...
    4. passing 2 values from a page to another ASP page
      <a href="page2.asp?var1=Value1&var2=Value2">click</a> or use a link that invokes some javascript to post the form -if- you still want to use a...
    5. passing through values
      Hello i wanna pass through the value model like this <form method="get" action="meeet.htm"> <div align="center">Nummer: <input type="input"...
  3. #2

    Default Re: [PHP] Passing values from one page to another

    --- murugesan <mukeshgct@hotmail.com> wrote:
    > <a href="page1.php?empid=1">Enter</a>
    ....
    > <input type=hidden name=empid value=<?php echo $empid;?>>
    [url]http://www.php.net/register_globals[/url]

    Chris

    =====
    Become a better Web developer with the HTTP Developer's Handbook
    [url]http://httphandbook.org/[/url]
    Chris Shiflett Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139