1
<?php 
if($result_array['ACK']== 'Success'){
  global $wpdb;
  $wpdb->insert('wp_paypal_payment', array(
    'amount' => $result_array['AMT'],
    'post_id' => $_REQUEST['post_id'],
    'firstname' => $_REQUEST['first_name'],
    'lastname' => $_REQUEST['last_name']
  ));  
  wp_redirect( get_page_by_title( 'thank-you' ) );
}else{
  header("Location : http://localhost/mysite/faq");
}
?>

My query is working but I have no idea that how I simply redirect in my page and display any my page content data in wordpress. So please help me.

closed as unclear what you're asking by Pieter Goosen, Mark Kaplun, Mayeenul Islam, shea, Robert hue Mar 23 '15 at 8:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

4

You should get ID of the page you're looking for:

$page = get_page_by_title('thank-you');
wp_redirect(get_permalink($page->ID));
exit;

It looks like you want to get page by slug. If that's the case, you should use this function instead.

Also, for Location header don't use space after "Location" string:

header("Location: http://localhost/mysite/faq");

Not the answer you're looking for? Browse other questions tagged or ask your own question.