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

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

need help with php get
i have a option box that gets filled with dates, but how do i get once the option value has been cli

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

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