On Wed, 2003-09-24 at 20:46, Martin Raychev wrote:
> Hi Jason,
> 
> it's not the code snip that is important but the fact that I DO have to have
> header(Location...) statement BEFORE anything else on the second php page.

This is incorrect. You MUST have the header( ... ) BEFORE any statement
that OUTPUTS to the BROWSER :) Feel free to validate before the header,
but don't output any content INCLUDING whitespace.

Cheers,
Rob.

> How can I do this since in order to validate form data with PHP I have to
> have validating code and the header statement to appear later, i.e. not
> first?
> 
> Thank you,
> 
> Martin.
> 
> ----- Original Message ----- 
> From: "Jason Wong" <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 23, 2003 6:10 PM
> Subject: Re: [PHP] Validation: Problems with header(Location) in PHP
> 
> 
> > On Thursday 25 September 2003 06:58, Martin Raychev wrote:
> >
> > > Thank you for answering me. I am sending the code that you requested.
> I've
> > > shotened it for brevity. The idea is that I am going to make the
> validation
> > > in the (2nd) "newaccount2.php" file which is the confirmation file. If
> > > everything is OK I will just print the correct filled-in data. Otherwise
> I
> > > would like to redirect the users back to the previous page
> >
> > [irrelevant code snip]
> >
> > In your original post you say that you had problems with redirecting using
> > header().
> >
> > Again, please:
> >
> > 1) describe *how* it's not working.
> > 2) post the *relevant* code
> >
> > > I've surfed a little but found no ellegant validation solution so
> > > far.
> >
> > There are plenty of ready-to-use validation classes at www.phpclasses.org
> >
> >
> > -- 
> > Jason Wong -> Gremlins Associates -> www.gremlins.biz
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> > ------------------------------------------
> > Search the list archives before you post
> > http://marc.theaimsgroup.com/?l=php-general
> > ------------------------------------------
> > /*
> > 44. Say, What does "Superblock Error" mean, anyhow?
> >
> > --Top 100 things you don't want the sysadmin to say
> > */
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to