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

Placing and array within an array then sorting it!
I have a page that runs two large mysql queries and saves the results into arrays, in php I then per

PHP Code / Script To check weather the given email exists in a domain
Hi,

I want to implement the following in my web page

in sign up we will ask to enter u

RadioButtonList data selection
view plaincopy to clipboardprint?

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

 formating when pulling data from a mysql database 
Ok so Im not to sure if this is the right thread to post in but here is my catch 22 issue.

I

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