Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    30

    Unanswered: href with # in php

    i'm making a php script which call itself through form method=post.
    PHP Code:
    <?
    $step
    =$_POST[step];
    echo 
    "step=$step <br>";   // $step was successfully retrieved

    if(isset($_POST[btn])){
      `
    executing_some_shell_program`;
    }

    echo 
    "<FORM NAME=continue_form METHOD=POST ACTION='$_SERVER[PHP_SELF]#${step}'";
    echo 
    "<input type=submit value=click name=btn>";
    echo 
    "<input type=hidden name=step value=14>";
    echo 
    "</FORM";
    ?>
    ....... SOME OTHER PAGE OUTPUT (HTML) ...
    <a hname=14>this is the anchor link which i want after post event</a>
    however, when i click on the form button, anchor isnt set.
    and i have only http://myserver.com/script.php#
    withought "14" at the end...

    BUT, when i view the HTML source, the form action is stated to ****.php#14
    what's the reason for this confusement?

    thanks

  2. #2
    Join Date
    Jul 2004
    Posts
    30
    sorry, solved
    thanks for those who read anyway
    i dunno where goes wrong, but it works right now
    maybe some grammar problem

Posting Permissions

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