what are the code to link to another page?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
joseph
Forum Newbie
Posts: 24
Joined: Mon Jul 03, 2006 6:15 am

what are the code to link to another page?

Post by joseph »

I have this feedback form, and I want this to direct to another page after the form is sent. What codes will I use? I forgot how to use the window.something variables..
User avatar
andym01480
Forum Contributor
Posts: 390
Joined: Wed Apr 19, 2006 5:01 pm

Post by andym01480 »

If it's to process the form

Code: Select all

<form action="processpage.php" method=post>
is the html tag at the start of the form.

If its after the form has been processed and no output has been sent to the browser then use

Code: Select all

<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>
Post Reply