Redirect not working after making a POST/GET


Posted on 16th Feb 2014 07:03 pm by admin

Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button and other page which has code to redirect to another website with the post value as querystring. When I tried to print the post data in the second page after posting, it worked fine, but when I have the header function in the second page the application hangs.

Below is the code from these pages

First Page
<html>
<body>
<form action="welcome.php" method="get">
Search Phrase: <input type="text" name="fname" />
<input type="submit" />
</form>
</body>
</html>

Second Page

<?php
header( 'Location: http://www.google.com' ) ;
?>

Since I have problem in redirecting, the second page does not have code to pass query string data.

How can I get this working ?

Regards

No comments posted yet

Your Answer:

Login to answer
309 Like 33 Dislike
Previous forums Next forums
Other forums

Forgot password won't work
My forgot password thing is not working properly. It is giving me this errorMailbox unavailable. The

Pre-Fill out a PHP form...??
This is for work actually (geek squad). We have to fill out this online php form at work over and ov

PHP Thumbnail Creation
Ok so i use this function to create thumbnails:

Code: [Select]function createthumb($name,$fil

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

Function
How can I make this function that once you click the link in the code it takes you to a new page wit

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

button.click += new eventhandler() not works in if(!ispostback)
i want to use button.clcik event in function VIewScrap() which is called in if(!ispostback) but itdo

Best PHP Documentation generator
Hello guys!

I would like to hear from you what is the best PHP documentation generator. Perso

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash