Menu

How 2 stop redirects or thank you page

Help
IdahoJoe
2006-01-31
2013-06-03
  • IdahoJoe

    IdahoJoe - 2006-01-31

    Hi:

    How can the URL redirect or thankyou page feature be disabled? Is there any way to just submit the form and that be the end of it? It would be nice if viewers did not have to leave the page for any reason...not even to click a window shut.

    Thanks,
    IJ

     
    • TNTEverett

      TNTEverett - 2006-01-31

      The process.php file has one of two options when you generated the form.
      1.) Precoded thank you html in the file.
      2.) A redirect link to an external html file.

      In either case you can edit the process.php file to change or remove either option. 

      The precoded option will look something like this:

      <!-- This is the content of the Thank you page, be careful while changing it -->
      <h2>Thank you!</h2>
      <table width=50%>
      <tr><td>FirstName: </td><td> <?php echo $FirstName; ?> </td></tr>
      <tr><td>LastName: </td><td> <?php echo $LastName; ?> </td></tr>
      <tr><td>Email: </td><td> <?php echo $Email; ?> </td></tr>
      </table>
      <!-- Do not change anything below this line -->

      The redirect option will look something like this:

      header("Refresh: 0;url=http://www.url.xxx/page.htm");

       
    • IdahoJoe

      IdahoJoe - 2006-02-01

      Thank you for taking the time to respond. Yes, I tweaked the items mentioned above, but am unable to stop both of them - a new url opens no matter what. I guess you could redirect to the originating page where the form was at...but that means your limited to one url unless you have a bunch of different process.phps??? and different code for each??? right???

      Ideally, the user would input and submit the info and never see another window open or be led from the originating page. Just press the button and the only confirmation they would receive would be an email from the list they just subscribed to. I used the info from:

      http://sourceforge.net/forum/forum.php?thread_id=1405284&forum_id=149299

      to do that but had to use "$EmailAddress" instead of "from_email@domain", but I still can't remove the thankyou or redirect. I remove the thankyou text and upon submitting the form, you are sent to a blank thankyou page. If I redirect, you still leave the url where the form is at - how can I stop that...or can it even be done?

      Thank you again,

      IJ

       
      • TNTEverett

        TNTEverett - 2006-02-01

        The submit button must have some action.  In our case the action is the process.php file.  Without this you would have no results.  You have two options.
        1.)Your for can be converted to form1.php and include the process.php code.  Difficult if you don't know php. 
        2.)You can put a redirect in the process.php file right back to the form1.html.
        header("Refresh: 0;url=form1.html");

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.