Results 1 to 2 of 2

Thread: help using grabbing post value and using it inside form imput hidden value

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    help using grabbing post value and using it inside form imput hidden value

    Hi all. i am passing 3 values to a second page and i want to use it inside html in form imput as hidden value instead of ????? . Could any one show me how i can grab the passed value and place it instead of ?????.Thanks


    PHP Code:
    <php?

    $name $_POST['cmdname'];
    $password $_POST['cmdpassword'];
    $secretanswer $_POST['cmdsecretanswer'];

    echo 
    $name;
    echo 
    "<br>";
    echo 
    $password;
    echo 
    "<br>";
    echo 
    $secretanswer;
    echo 
    "<br>";

    ?>
    <html>
    .........
    .........
    .........
    <input type="hidden" name="cmdname" value="????? " />
    <input type="hidden" name="cmdpassword" value="????? " />
    <input type="hidden" name="cmdcmdsecretanswer" value=" ?????" /> 

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: help using grabbing post value and using it inside form imput hidden value

    Try something like this:

    PHP Code:
    <php
      $name = $_POST['cmdname'];
      $password = $_POST['cmdpassword'];
      $secretanswer = $_POST['cmdsecretanswer'];
    ?>
    <html>
    .........
    .........
    .........
    <input type="hidden" name="cmdname" value="<?=$name;?>" />
    <input type="hidden" name="cmdpassword" value="<?=$password;?>" />
    <input type="hidden" name="cmdcmdsecretanswer" value="<?=$secretanswer;?>" />
    -- Ryan Jones
    My Blog.

    Ryan Jones.

Posting Permissions

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



Click Here to Expand Forum to Full Width