Loading ...
Sorry, an error occurred while loading the content.
 

Re: [forms-dev] form generation class

Expand Messages
  • Manuel Lemos
    Hello, ... This was already answered in the forum: http://www.phpclasses.org/discuss/package/1/thread/4/ ... You need to see the line that the error message
    Message 1 of 6 , Oct 21 3:31 PM
      Hello,

      on 10/19/2005 06:44 PM panospheric said the following:
      > I am using Manuel Lemos form class - great class. I can't figure out
      > how to avoid that the completed form after submitting is displayed
      > once more(as display only $form->ReadOnly=1;) before I redirect to
      > another page.

      This was already answered in the forum:

      http://www.phpclasses.org/discuss/package/1/thread/4/


      > I have another question. In a file: display_login_form.php I want to
      > start a login session when the form has been successfully submitted.
      > If I want to do this in the same page before redirecting to another
      > page, I get the error message:header already sent, can't sent session
      > header. Is there a way around this without doing the session/login on
      > the redirected page. I am sorry, I might not explain that very well. I
      > am not a php pro.

      You need to see the line that the error message mentions where the
      output started. You need to generate any headers before that line is
      executed.


      --

      Regards,
      Manuel Lemos

      PHP Classes - Free ready to use OOP components written in PHP
      http://www.phpclasses.org/

      PHP Reviews - Reviews of PHP books and other products
      http://www.phpclasses.org/reviews/

      Metastorage - Data object relational mapping layer generator
      http://www.meta-language.net/metastorage.html
    • Chris Grafix
      Thank you very much for your great input. That sure help me taken on my problem. I still have a long, long way to go learning PHP/MySQL. Thanx again, Chris ...
      Message 2 of 6 , Oct 22 1:37 AM
        Thank you very much for your great input. That sure
        help me taken on my problem.
        I still have a long, long way to go learning
        PHP/MySQL.

        Thanx again,
        Chris

        --- operationsengineer1@... wrote:

        > > Hi,
        > > Thank you very much for taken on my problem.
        > > Actually I am doing the
        > > same thing. The only problem is that when the form
        > > has been
        > > validated/submitted it presents the form in
        > > read-only output once more
        > > before it reloads the register.php page. That's
        > the
        > > page that
        > > displays/includes the display _register_form.php
        > > file.
        > >
        >
        ************display_register_form.php*****************
        > > $form->ReadOnly=1;
        > > .
        > > .
        > > .
        > >
        >
        $URI="register.php?result_user=$result_user&result_contact=$result_contact&result_address=$result_address&user=$username";
        > > // Optional - pass session ID in URI. Not as
        > > safe.
        > > echo"<META
        > > HTTP-EQUIV=\"Refresh\"content=\"0;URL=$URI\">";
        >
        > > .
        > > .
        > > .
        > >
        >
        ********************************************************
        > > In the display_register_form.php file I reload the
        > > pager register.php
        > > after the form has been submitted/validated.
        > >
        > > I use HTML reload instead of the header() function
        > > because I had
        > > problems with the error message header already
        > > sent.(It interferes
        > > with the DB Authentication class I am using). When
        > > you look at Manuel
        > > Lemos's test_form.php that comes with the class
        > you
        > > can see what I
        > > mean. You fill out the form and it will display
        > the
        > > form in read-only
        > > format after submitting/validation since he did
        > not
        > > add a form
        > > processing file to process the form data. Since
        > > reload is much slower
        > > than the header() it displays the read-only form
        > for
        > > a couple of
        > > seconds before it reloads the register.php page.
        > How
        > > can I turn this
        > > off. Sorry for my poor explanation of the problem.
        > > Thank you very much though.
        > >
        > >
        > > Chris,
        > > PANOSPHERIC Virtual Imaging
        >
        > Chris, i think i get the idea. before you are
        > reloading you must be telling the program to display
        > the information. can you eliminate that code and
        > set
        > up the remaining code so it only displays when you
        > want it to? one shouldn't display data they don't
        > intend to display and rely on a fast refresh or
        > transfer to another page under any circumstances.
        >
        > you can set a session variable (possibly a hidden
        > form
        > element) to indicate what action your program can
        > take.
        >
        > if your authentication class doesn't allow you to
        > use
        > sessions then dump that class like it is a hot
        > potato.
        > no class should force you to dump important
        > functionality like passing session variables, jmho.
        >
        > you may be able to find another one without a
        > similar restriction.
        >
        >
        >
        >
        > __________________________________
        > Yahoo! Mail - PC Magazine Editors' Choice 2005
        > http://mail.yahoo.com
        >




        __________________________________
        Yahoo! FareChase: Search multiple travel sites in one click.
        http://farechase.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.