"Bob Garbados1" wrote:[color=blue]
> Thanks for your help.
>
> I see the URL of the page containing the header() statement, but
> there’s no
> content... just whitespace. I created a script with just the[/color]
header[color=blue]
> statement earlier today and it worked without a hitch.
>
> Any php script that I put on the server that has an error like a
> missing
> semicolon, I just see a blank page and no error message.
>
> Originally, my reasoning for having the form post to a different
> script is
> because I will be creating 5 reservation forms for different[/color]
events.[color=blue]
> All of
> the forms have the same fields for contact info and billing info,
> they’ll
> just have different fields for information pertaining to each[/color]
specific[color=blue]
> event. So I wanted to keep all of the validation logic for the
> contact and
> billing info in one spot and not have to maintain the code in five
> different
> places. Am I correct in assuming I could accomplish this through[/color]
some[color=blue]
> kind
> of include file then?
>
> "steve" <UseLinkToEmail@dbForumz.com> wrote in message
> news:41261df0[/color]
_2@news.athenanews.com...[color=blue][color=green]
> > "Bob Garbados" wrote:[color=darkred]
> > > steve <UseLinkToEmail@dbForumz.com> wrote in message
> > > news:<41252ed4_2@news.athenanews.com>...
> > > > "Bob Garbados" wrote:
> > > > > forgive my ignorance, as I?m new to php coming[/color][/color]
> from a ms[color=green][color=darkred]
> > > > > background...
> > > > >
> > > > > If I create a page named redirect.php and it?s[/color][/color]
> only content[color=green][color=darkred]
> > > is:
> > > > > <?php
> > > > > header("Location: http://www.google.com");
> > > > > ?>
> > > > > Should it not redirect to
www.google.com? I[/color][/color]
> can?t get the[color=green][color=darkred]
> > > > > header()
> > > > > function to redirect.
> > > > >
> > > > > I?m trying to take an online reservation... the[/color][/color]
> customer[color=green][color=darkred]
> > > fills
> > > > > out
> > > > > contact and billing info at SignUp.php. The[/color][/color]
> form on[color=green][color=darkred]
> > > SignUp.php
> > > > > submits to Confirm.php, where I perform[/color][/color]
> validation.[color=green][color=darkred]
> > > > >
> > > > > If the input fails validation, I want to[/color][/color]
> redirect back to[color=green][color=darkred]
> > > > SignUp.php.
> > > > > Otherwise I will display the input for[/color][/color]
> confirmation before[color=green][color=darkred]
> > > > processing
> > > > > the order. Maybe I?m implementing this wrong...[/color][/color]
> using asp[color=green][color=darkred]
> > > > > thinking
> > > > > for a php implementation, but I think this[/color][/color]
> should be simple[color=green][color=darkred]
> > > and I
> > > > must
> > > > > be missing something.
> > > > >
> > > > > thanks.
> > > >
> > > > The normal way is to process the form on the same[/color][/color]
> script, and[color=green][color=darkred]
> > > redirect
> > > > only if everything is ok. The reason has to do with[/color][/color]
> post[color=green][color=darkred]
> > > variables,
> > > > and people going back to prev. page (complex but take[/color][/color]
> my word for[color=green][color=darkred]
> > > it).
> > > > If you redirect, make sure nothing has been written[/color][/color]
> out (e.g.[color=green][color=darkred]
> > > header
> > > > stuff, spaces, etc.). It should work. Please report[/color][/color]
> the error[color=green][color=darkred]
> > > you
> > > > get.
> > >
> > > Thanks...
> > > I’m not seeing an error message, just a blank page.[/color][/color]
> I’m[color=green][color=darkred]
> > > testing it on
> > > my hoster’s server because I haven’t configured[/color][/color]
> IIS to[color=green][color=darkred]
> > > suppport php
> > > yet and I don’t have a linux box set up yet. Is[/color][/color]
> there something[color=green][color=darkred]
> > > to
> > > configure in php.ini to display error messages?
> > >
> > > Let me see if I have this right... I have to post the form[/color][/color]
> on[color=green][color=darkred]
> > > SignUp.php back to SignUp.php, perform the validation, and[/color][/color]
> redirect[color=green]
> > to[color=darkred]
> > > the confirmation page if everything passes validation prior[/color][/color]
> to the[color=green][color=darkred]
> > > <html> tag?
> > >
> > > thanks again.[/color]
> >
> > Hi Bob, surprised you get a blank page. Is there a URL or[/color]
> nothing at[color=green]
> > all? Why don’t you create a test script with just the[/color]
> header[color=green]
> > statement and see how it works.
> >
> > Yes, you redirect to the same page. So your form would say
> > <form action=’’ method=post>
> > and you also would have a hidden field <input type=hidden....
> > which would be used in the validation to detect that the form has[/color]
> been[color=green]
> > submitted. Then if everything is ok, you can redirect.
> >
> > --
> >
http://www.dbForumz.com/ This article was posted by[/color]
> author’s request[color=green]
> > Articles individually checked for conformance to usenet standards
> > Topic URL:[/color]
>
http://www.dbForumz.com/PHP-header-r...ict141549.html[color=green]
> > Visit Topic URL to contact author (reg. req’d). Report[/color]
> abuse:
>
http://www.dbForumz.com/eform.php?p=473984[/color]
Bob, as far as header, try to do the header logic at the very top of
the code before anything else is sent. Also do try the buffering with
ob_start, if nothing else works.
PHP has a nice "include" so you can keep the logic in one place.
That is not a problem. Just be cautious of the ways paths in include
work. A bit counter-intuitive, but you should be ok.
--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbForumz.com/PHP-header-r...ict141549.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbForumz.com/eform.php?p=474163