Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7525037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:13:40+00:00 2026-05-30T03:13:40+00:00

i am using the following code for form action, // includes require_once(‘inc/mysql_wrapper.php’); $DB=get_db_connection(); require_once(‘inc/defines.inc.php’);

  • 0

i am using the following code for form action,

// includes




require_once('inc/mysql_wrapper.php');
$DB=get_db_connection(); 
require_once('inc/defines.inc.php');
require_once('lib/functions.php');
require_once('lib/framework.php');
require_once('lib/specific.php');
require_once('lib/table_editor.php');
require_once('lib/user.php');
require_once('models/basic.php');
require_once('models/list.php');
require_once('swiftmailer/lib/swift_required.php');
require_once('recaptcha/recaptchalib.php');
// end includes

$q="SELECT value FROM $T_SETTINGS
WHERE name='register'";
$register=$DB->oq($q);

$optin=get_setting("optin");

// select custom fields if any
$q="SELECT * FROM $T_FIELDS 
WHERE list_id='$_GET[list_id]'
ORDER BY id";
$efields=$DB->aq($q);

// select mailing list
$q="SELECT * FROM $T_LISTS WHERE id='$_GET[list_id]'";
$list=$DB->sq($q);

if(!empty($_POST['ok']))
{
    // validate recaptcha if required
    if($list['require_recaptcha'])
    {
        $resp = recaptcha_check_answer (RECAPTCHA_PRIVATE,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

        if (!$resp->is_valid) 
        {
            $recaptcha_error="Looks like the words you entered are not correct!";        
            $template="templates/register.html";
            require_once('templates/master.html');
            exit;
        }                        
    }

    User::register($_POST, $efields, $optin);

    if(!empty($list['redirect_to']))
    {
        redirect($list['redirect_to']);
        exit;
    }

    $template="templates/message.html";
}
else
{
    $template="templates/register.html";
}

require_once('templates/master.html');

excluding some other options, majorly the form data which this form recieves is

name , email , ok (a flag to check that the the orginating form was submitted)

how can I redirect this page to thanks.php when the form has been submitted?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:13:42+00:00Added an answer on May 30, 2026 at 3:13 am

    Can’t you post it directly in thanks.php?

    Thanks.php should control data format and display message, or redirect (by place into header that string: header('Location: urlOfForm-postedPage);.

    So, if data are correct (and if a control is needed, but I suppose yes) you don’t need a redirect.

    More over, if controll are done into the original page (simply JS or JQuery?), you can save some redirects.
    And that will be more efficient!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using the following code in my Web form code-behind classes. I want
I am successfully posting a form via ajax, using the following code; $.post( Page.do?source=ajax,
I have in my Form constructor, after the InitializeComponent the following code: using (WebClient
Once I replaced form{:action => /comments} with a form_tag('/comments') in the following code: =form_tag('/comments')
Currently i am validating the validation form for phone number using the following code
In the following code, I'm using Ajax.BeginForm to post data to the action asynchronously.
I am trying to use link to submit a form using the following code:
I am using following code in rowdatabound function. Protected Sub gvwMileStone_RowDataBound(ByVal sender As System.Object,
I am using following code to check whether a check box on my website
I am using following code to design my home page. The output (as shown

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.