Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Redirect To The HTML Page


I have a page which is all PHP processing. It outputs errors via echo.

Since I am using echos for errors, I can not use header("location:http://wwhatever.com") after the code to redirect to the HTML page depending on the success of my operation. The user arrives at this page after clicking a submit button. Form action gets me to the page. The page is all PHP right now.

What is a good way to get around this? I do need the echos in case there are errors - also to keep the user apprised of what is happening in the processing.




View Complete Forum Thread with Replies

Related Forum Messages:
Php Location Redirect In A Html Page
I'm having trouble including this php into a html page. I can't rename the file as a .php file it must be in html. Code:

View Replies !
Can You Redirect Every Existing Html Page Through A Php Function?
Is there a way to redirect every single page on an existing web site through
a php function?

In other words, say I have a whole functional HTML web site, never written
to use any php. Now I would like to have a php function handle displaying
every page, for example, instead of:

http://www.mysite.com/mypage.html

you would call:

http://www.mysite.com/dopage.php?p=mypage.html

....and then the php could do some fancier includes at the end of each page,
etc., or add a header, etc.

I don't want to rewrite the whole site and rename all the pages; also, this
site has been around for awhile and there are a lot of links floating around
the internet to direct urls on the site, so I'm wondering if I can intercept
every URL to that site and redirect it to the php function, which will then
open the page.

View Replies !
How Do I Exit An Html Frameset As I Have A Link Which Has To Redirect Back To The Index Page?
I was just wondering in how do I exit an html frameset as I have a link which has to redirect back to the index page as shown below, which should not have the frames. header("location:index.php");

View Replies !
Warning: Cannot Modify Header Information - Redirect From Login Page To Logged In Page
I am trying to redirect from login page to logged in page, but using the {header( 'Location: C:wampwww' ) ;} is giving me this error {
Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwpassword.php:14) in C:wampwwwpassword.php on line 35}, find below my code:

View Replies !
Html Redirect
The website I have taken over has a lot of bagage. Every page has the side menu. so changing a link is a nightmare. All the pages are html. I want to replace one with PHP. Without going through every page to change one link, is it possible to have a dummy html page that re-directs to the PHP page. header('Location: ..) works in PHP but I need a html redirection here.

View Replies !
Redirect HTML ->
I have a site that is about to transition from all HTML pages to all PHP pages. The page names will remain identical with only the extensions changing. Is there a simple solution so that anyone coming in via bookmarks or search engines and accessing a .html page will be seamlessly forwarded to the identical .php page?

View Replies !
How To Redirect To 404.html Using Header()
we need to redirect to a custom 404 page in PHP source code.

For example, a page URL is htt p://www.site.com/info.php?id=123

When the DB query for id=123 returns nothing, I will redirect user to a custom 404 page, by using the following method:

header("Location: /404.html");
However, according to Server Header Check, I just sent a 302 header and tell google that the content of www.site.com/info.php?id=123 is temporary moved to www.site.com/404.html (and please come back later). Code:

View Replies !
HTML Form + Redirect URL
I have two other things I'd like to do, one is I want the user be able to browse their files upload and send me a file via the same contact form. I have the HTML in the doc, but I need the script to make it work. I also would like to redirect them to a thank you page when they hit submit, instead of sending them a text message. Here's the code I have so far....

if(!$mail->Send())
{
echo "<b>Your query was not sent. Please try again later.<b>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
else
echo "<b>Thank you for your interest in xxxxxx! Someone from our sales team will contact you within 2 business days.</b>";

?>

View Replies !
Redirect To Html When Apache Is Down
I am running the apache server from home and my website from an php unsupported web server. I need a way to see if the appache is running to access on_air.php, if not redirect to an html page on my webserver. Remember my server doesnt support php, so I am looking for an if then kind of statement.

View Replies !
How Do I Redirect A User From A Page To A Different Page ?
How do i redirect a user from a page to a different page ? i don't want variables to follow behind the url of the pageg being redirected to.

View Replies !
Redirect To New Page.
<?
if ($sitestyle == " ")
{
XXX
}
?>

Above is a simple if statement. Is there a function I can replace the XXX with to make the browser goto a different URL without a link. At the moment this sits at the top of each page I want it so that if $sitestyles has no value then the browser is automatically forwarded to a different page without continuing to load the present one. Is this possible in php?

View Replies !
How Do I Redirect To Another Page
I have a contact form which submits to the php script (processMail.php) but I want that processMail.php page to send straight on to another page (thanks.html). how do i do this without javascript?

View Replies !
Redirect To Another Page
user information collected in a page and added to the database when submit happens,
at the same time after updation of database,

i want to redirect to tsome other page, i used header it's not working becoz of the constraints it had. i am restricted to use only server side scripting,not other client side scripting is allowed to use including jscript.

View Replies !
How Can I Redirect A Page Using PHP?
How can I redirect a page using PHP?

View Replies !
Redirect Php Page
i have been using this java script to redirect my php page when i am done with the page.the java script is:

<script type="text/javascript">
<!--
alert("Created!");
window.location='../new_main.php'
-->
</script>

Can anyone tell me how to redirect a php page to the destinated location using php functions or codes.

View Replies !
The Page Can Not Be Redirect!!!
I can not redirect from one page to another. But I can see all the database info from the page by using PrintVars(). My PHP version is 5.2.3, just wondering how can I solve this problem!

View Replies !
To Redirect To Another Page
I want to redirect to another file, isn't this the right code to do so

header("Location:http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/images/$file_name");

the interpreter give me this erorr instead of redirecting

Warning: Cannot modify header information - headers already sent by
(output started at E: ryphpdirect.php:9) in E: ryphpdirect.php on
line 70

what's wrong in the code coz i don't understand the erorr

View Replies !
Page Redirect
I am trying to make a new post which requires user to login...just like the one used in here.... as you see, in the URL above, there is some value to pass "action", "s" ....
how can I get these values again after redirect...Code:

View Replies !
How Do I Redirect A Web Page?
How do i redirect a web page
Ive using this meta tag:
<meta http-equiv="REFRESH" content="4; url=http://www.redirect_here.com">
Not working, is there something else.

View Replies !
What Is The Best Way To Redirect To Other Page?
what is the best way known and also faster to redirect from htm/html page to other page, instantly.

View Replies !
How Can I Use Php To Redirect To A Different Page?
This is my situation:

echo "text";
header("location:http://www.blah.com");

That doesn't work. Is there a different way of doing this, a way to redirect the page using PHP after text has been entered into the browser?

View Replies !
Redirect To A Page In Php
Is it possable to redirect to a page in php. but not using the header("include"); function ??

View Replies !
Redirect To A Thank You Page
Got this nice little contact form that is called into the page with the 'include' command.

So that I can use conversion tracking I now need to direct the user to a 'Thank You' page to be able to count the form submission as a 'conversion'.

Is it something simple to just change in the echo command below to do that? Code:

View Replies !
How To Redirect A Page By Using Php?
how to redirect a page by using php? I am doing it by javascript, but how in php? I use header("Location: success.php"); but it some time warning coomon error cannot sent header already sent.

View Replies !
Redirect Page At The End
I looked and looked for half a day and have not found a solution for my problem, hence i am posting it here.

I want to reload my php page once.I can't use header func as i need to run a lot of code and html tags before i require the reload. (say in the middle of the php page.) so its safe to assume i have given a load of chars to the browser before i want to reload/redirect to the same page. :-)
Can anyone suggest any ideas on how to go about doing this automatically?

View Replies !
Redirect To Another *.php Page
Please guide me in php command to redirect from current *.php to another *.php page.

View Replies !
Redirect Page
When someone clicks a link on my page, I want them to go to redirect.php. This page will send them to either URL A or URL B. There is a 50:50 chance they will go to either page.

How would redirect.php look?

View Replies !
Trying To Redirect Page
I have a page that submits users info. then it takes it to a page where it checks for validation. if validation is correct, it takes it back to the orginal page in which the form was submited with a defined session var.

When i run the page. I type in my information into the form and when i press submit. I get the error below
Warning: Cannot modify header information - headers already sent by (output started at C:wwwapachehtdocscheck.php:9) in C:wwwapachehtdocscheck.php on line 23

whats the problem ?

View Replies !
Redirect A Page
I'm trying to send the viewer back to the previous page viewed after something has been written to the page(or without changing the header). Right now I'm using a javascript redirect function to do it, but it doesn't look like javascript can do what I want it to do.

What I mean is, I'm using an RPC(remote produce call) function to dynamically change a page. When someone clicks a link it takes them to another page in the site. When they click the link to go back to the dynamic page, I want them to go back to the changed page and not for the browser to reload the page and start them over.

View Replies !
Redirect A Web Page
like asp response.redirect , is it any command in php to redirect a wab page. i am already used header() function , how is it work .

View Replies !
Redirect To A Page
When i am using

header(location: url);
in meddle or end of my php script or html
i am facing following problem
Header already sent.

while when i am using

header(location: url);
in the start of page it works fine,

Is there any redirect('url') function in php like asp or any other alternitive that i can redirect to a page instead of using header() function becuase it is not working when we call it from meddle of html page.

View Replies !
How To Redirect A Page Using Php?
Anybody how to redirect a page using php?

View Replies !
Page Does Not Redirect
The following code is intended to look in my database to see if there is a matching ipaddress and if there is, set action=1 in the records' action field. But instead, I just get a blank screen, no redirect and no action=1.. If I eliminate the database code section, it redirects. What is wrong with my code? Code:

View Replies !
How Do I Redirect To A Page
I am working on some simple authentication code where someone logs in with a name and password. I have been testing out where it does the following on success:

{//variables match

echo "<h3 class='loginmsg'>It worked!</h3>";
}

So now that I have it working if I wanted to bring up myfile.pdf when they succeed what would I need to replace the echo line with?

View Replies !
Redirect To Page
I have 9 different pages and I want that each time the user clicks on the link he will be redirected to different page starting from page1,page2,page3.. page9 en then again page1. I don’t need random page that starts from page5 en than page8,page3 it has to start from page1.

View Replies !
<link:page.html,xxx> => <a Href="page.html?id=xxx">
I want to transform this code <link:page.html,xxx> to

<a href="page.html?id=xxx"> dynamically.

I tried out alot of preg_replace stuff, but I didn't get to manage it.

View Replies !
Redirect A Link To Another Page After It Has Been First Used?
Is there any way to redirect a link to another page after it has been first used? Or even kill the link after its first use?

View Replies !
Redirect At Other Link Page
by php which the fast solution for make redirection at homepage ?
Time ago read some solutions, but one most fast because not load
or not make a reload of itself page, not remember
exactly but was a solution more fast...

View Replies !
Redirect The User To Another Page
i want redirect the user to another page for that what can i do in Php3? i.e.,what function i used?

View Replies !
Redirect Home Page
I have a "new" homepage. How do I automatically direct clients to this new
home page, i.e. when clients enter "OldHomePage.php", they will
automatically be directed to "NewHomePage.php."

View Replies !
Header() To Redirect A Page
I know that you can use header() to redirect a page, but that you have to use it before any script executes; How do you redirect the page after the script executes?

View Replies !
Registration Page & Redirect
I would like to put a redirect on the following line shown below in the code if registration is successful: Code:

View Replies !
Redirect If Page Does Not Load
I have a form that will not submit if certain data cannot be found in Mysql or it will take very long to submit. Is there a way i can have the form go to an error page if it does not submit or load results in 5 seconds.

If it does take long i need the following:
$msg[] = $error10;
header("Location: quote_error.php?");

View Replies !
PHP Drop Down To Redirect URL On The Same Page
I have a "Go" button and drop down list of the following:

Yahoo
MSN
Google

How do I link the Yahoo to www.yahoo.com, MSN to www.msn.com and Google to www.google.com upon pressing "Go"? The redirect will display the website on the same page.

View Replies !
Redirect To Same Page After Login..
I have login box running across all pages for login, template based.. so the script is module based ..

on login script page

tep_redirect(tep_href_link(FILENAME_DEFAULT)); and it goes to index.php  -- I want the filename to go the same page after login....    ie stay on the same page... how can I define this ?  I thought I could define a _DEFAULT2 and define that where the filenames.php are located... what is the script for redirecting to the self/ same page in php..tried a few things but no luck,,,should be pretty simple?

View Replies !
Pausing A Page Before Redirect
I have seen many pages that pause before re-directing. I have been unable to find anything to help me in coding something like this. Anyone have an example I can looke at? I even searched the these forums.

View Replies !
Redirect, After Page Has Loaded
on my 'Register Member Page', if a user successfully fill's in all the fields, then they get sent to a new page where it say's "You have successfully Registered"

if( (!$fname == null) or (!$sname == null) or (!$email == null) or (!$username == null) or (!$password == null))
{
   $query = "INSERT INTO members (Firstname, Surname, email, username, password)
   VALUES('$fname', '$sname', '$email', '$username', '$password')";
   mysql_query($query) or die(mysql_error());
   mysql_close();

   echo "You have successfully Registered";
}
endif;

What i wanted to do was show this page for about 10 seconds then, the user gets automatically directed to the login page.

View Replies !
Redirect To Another Page With If Statement
I was hoping to get a little help structuring a script that I'm trying to devise. I'd like an if statement that basically says: If there is no ZipCode in the current record in the database, then go to the ZipCode entry page, otherwise keep loading the current document.

View Replies !
Page Redirect From Within If Statement?
I would like to have users login, and based on this login, if they're one type of customer I want to take them to pagex.php, if they're another, I want to take them to pagey.php.

Since I don't know what type of customer they are until they've logged in, I can't redirect with the header function, so I thought maybe I could do it by grabbing their login info, and seeing if they're type x, then go to pagex.php if they're type y, go to pagey.php: Code:

View Replies !
How To Fix URL And Redirect The Page To Other Directory?
I want to keep the URL fix in the address bar and redirect the page to a different directory.how can i achieve this.

say for example-my URL is http://www.example.com ,I want to keep this fix but I want ,if someone clicks on this URL he will see the page of some other directory like - http://www.example.com/home/.

but in the address bar the URL will be shown as http://www.example.com

how can i achieve this.please help me to solve this problem.

View Replies !
Quickform Redirect Page
I am using quickform to display and process a form (email data) and need to redirect the page on successful submission. I've tried:

Code:
if ($form->validate()) {
$form->process('email_message');
header("thanks.php");
}

But I get header already sent errors.

View Replies !
Redirect To Home Page
I have three php files, one.php, two.php, three.php these three files need to be accessed in sequence. if one.php is submitted it displays two.php. if two.php is submitted, then three.php is displayed. if three.php is submitted then one.php will be displayed.

alternately, these three files can be accessed individually. like in the address bar user can type localhost:8080/one.php, localhost:8080/two.php or localhost:8080/three.php. when accessed individually, user should be redirected to one.php because two.php and three.php are getting some values from one.php and error is getting displayed when the later action is performed.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved