Posted by Jonathan N. Little on 02/07/07 19:59
php newbie wrote:
> Thanks all for valuable inputs, I will try phpinfo() function tonight.
> What could be the reason for code to be working on my local machine
> and not working on the web server.
>
> Following is the pseudo code of what my php page looks like
>
> ---- temp1.php --------
> <html>
> <head>
>
>
> </head>
> <body>
The "<html><head></head><body> stuff *cannot* be above your header call
that flows...
> <?php
>
> // test if this is postback
> // if this is postback
> // create session and write form fields to the session
> // call header(Location: ) function to redirect to temp2.php page
>
> ?>
>
> <form method="post" action="temp1.php" >
>
> // form input fields
>
> <input type="submit" value="Submit" >
> </form>
> </body>
> </html>
---- temp1.php -------- Should be:
<?php
//do what ever testing you want to determine if you want to redirect
if( $redirect_condition == TRUE ){
//put redirect here
header("Location: http://www.example.com/temp2.php");
}
//if your not redirecting then put your page below
?>
<html>
<head>...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|