call another php page into php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanjay123456
    New Member
    • Sep 2006
    • 125

    #1

    call another php page into php

    Sir

    I want to call another php page in to a php page

    [PHP]

    <?php
    if($counter==$_ SESSION['count'])
    {
    <form name="examinati on" id="examination " method="post" action="http://localhost/finish.php" >
    }
    ?>
    [/PHP]


    this is not work any error in this code ?


    sanjay
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Firstly, this is the same question you asked 3 weeks ago, where you received a reply and you never answered to that: http://www.thescripts.com/forum/thread548218.html
    It seems common decency to our members not to ignore a reply to your request, but to answer it before going on to a new thread. So, why are you asking this again in a new thread?

    About the question: when it is just a sample of the first line of your form, that is fine.

    But the code, as you show it, will not work, because you need a trigger to submit the form, something like a JS subit function or an <input type='submit' ,

    And maybe you'd also want some input fields. Also, coding the action= like you do makes it difficult to port to another site because you defined the address explicitely instead of action="finish. php".

    Ronald :cool:

    Comment

    • sanjay123456
      New Member
      • Sep 2006
      • 125

      #3
      Dear Ronald ,

      sorrry for start a new thread
      I am using following correction code but its not work;


      [PHP]

      <?php
      if($counter==$_ SESSION['count'])
      {
      <form name="examinati on" id="examination " method="post" action="http://localhost/finish.php" >
      <input type="submit" name="quit" VALUE="quit" onClick="incr(t his.form)">
      }
      ?>
      <SCRIPT LANGUAGE="JavaS cript">
      function incr(form){
      window.location .href = "http://localhost/finish.php";
      }


      [/PHP]



      sanjay

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        This is not going to work at all! Is this still what you wanted to do in the previous thread?? I.e. displaying courses by number and incrementing after each course taken? Because that form worked when it was posted.
        Later MySQL code was added and the logic got all mixed up, that's why it did not work.

        Are you saying that you want to do the same piece of work all over again in this thread?

        Ronald :cool:

        Comment

        • sanjay123456
          New Member
          • Sep 2006
          • 125

          #5
          Sir

          i make a online test paper
          i want that if number of question means $counter= session[count] then automatically call the finish.jsp on the same page of last thread where we increment
          session[count] .


          sanjay

          Comment

          Working...