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

Email Help

Expand Messages
  • mgobi2003
    HI all, I am very new to PHP programming. I would like to create page which will accept informations from the users and send it to my ID. I have tried it by
    Message 1 of 21 , Mar 1, 2004
      HI all,
      I am very new to PHP programming. I would like to create page which
      will accept informations from the users and send it to my ID. I have
      tried it by many ways but i am not able to send. I need to get that
      in HTML format. Can any one give me some sample programs. It will be
      helpfull for me.
      Thanks you,

      regarsd,
      gobinath
    • Jason Barnett
      What will you want to do with the user information? If you are looking for a simple front end for your website that can manage content, you might try
      Message 2 of 21 , Mar 1, 2004
        What will you want to do with the user information? If you are looking for a simple front end for your website that can manage content, you might try downloading phpNuke. Or did you have something more specific in mind?

        Jason


        mgobi2003 <gobinathm@...> wrote:
        HI all,
        I am very new to PHP programming. I would like to create page which
        will accept informations from the users and send it to my ID. I have
        tried it by many ways but i am not able to send. I need to get that
        in HTML format. Can any one give me some sample programs. It will be
        helpfull for me.
        Thanks you,

        regarsd,
        gobinath




        Look here for Free PHP Classes of objects:
        http://phpclasses.UpperDesign.com/


        Yahoo! Groups SponsorADVERTISEMENT
        Click Here

        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/php-objects/

        To unsubscribe from this group, send an email to:
        php-objects-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        ---------------------------------
        Do you Yahoo!?
        Yahoo! Search - Find what you�re looking for faster.

        [Non-text portions of this message have been removed]
      • mohammed farooq
        mgobi2003 wrote: HI all, I am very new to PHP programming. I would like to create page which will accept informations from the users
        Message 3 of 21 , Mar 1, 2004
          mgobi2003 <gobinathm@...> wrote: HI all,
          I am very new to PHP programming. I would like to create page which
          will accept informations from the users and send it to my ID. I have
          tried it by many ways but i am not able to send. I need to get that
          in HTML format. Can any one give me some sample programs. It will be
          helpfull for me.
          Thanks you,

          regarsd,
          gobinath




          Look here for Free PHP Classes of objects:
          http://phpclasses.UpperDesign.com/


          Yahoo! Groups SponsorADVERTISEMENT
          Click Here

          ---------------------------------
          Yahoo! Groups Links

          To visit your group on the web, go to:
          http://groups.yahoo.com/group/php-objects/

          To unsubscribe from this group, send an email to:
          php-objects-unsubscribe@yahoogroups.com

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




          Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more.
          ----------

          <?php
          include("creg.php");

          $submit = @$HTTP_POST_VARS["submit"];
          if(isset($submit))
          {
          $cname = @$HTTP_POST_VARS["cname"];
          $addr = @$HTTP_POST_VARS["addr"];
          $city = @$HTTP_POST_VARS["city"];
          $pin = @$HTTP_POST_VARS["pin"];
          tender_email($cname,$addr,$pin,$city);
          }
          ?>

          <html>
          <head>
          <title>Registration Form</title>
          </head>
          <body bgcolor="#ffffff">
          <table width="730" border="0" cellspacing="0" cellpadding="0" height="100%">
          <form name="Reg_frm" method="POST" action="register.php">
          <table width="525" cellspacing="0" cellpadding="0">
          <tr>
          <td width="27%" height="23">
          Company Name :
          </td>
          <td width="73%" height="23">
          <input type="text" name="cname" size="20" maxlength="50" value="<?=@$cname;?>">
          <font color="red"> *</font>
          </td>
          </tr>
          <tr>
          <td> </td>
          </tr>
          <tr>
          <td width="27%" height="23">
          Address :
          </td>
          <td width="73%" height="23">
          <textarea name="addr" size="20" maxlength="200"><?=@$addr;?></textarea>
          <font color="red"> *</font>
          </td>
          </tr>
          <tr>
          <td> </td>
          </tr>
          <tr>
          <td width="27%" height="23">
          City :
          <br>
          </td>
          <td width="73%" height="23">
          <input type="text" name="city" size="20" maxlength="25" value="<?=@$city ;?>">
          </td>
          </tr>
          <tr>
          <td> </td>
          </tr>
          <tr>
          <td width="27%" height="23">PIN :</td>
          <td width="73%" height="23">
          <input type="text" name="pin" size="20" maxlength="6" value="<?=@$pin;?>">
          <font color="red"> *</font>
          </td>
          </tr>
          <tr>
          <td> </td>
          </tr>
          </table>
          </body>
          </html>



          ----------

          <?php
          function tender_email($cname,$addr,$pin,$city,$country,$cperson,$mailid,$web,$phone_ISD,$phone_STD,
          $phone_PCO,$fax)
          {
          $phone = "$phone_ISD - $phone_STD - $phone_PCO";
          $subject = "Pre - Registration Form Details";
          $message ="Pre - Registration Form Details";
          $message .="\n ---------------------------------------------";
          $message .="\n Company Name : $cname";
          $message .="\n Address : $addr.";
          $message .="\n PIN : $pin.";
          $message .="\n City : $city.;";
          $message .="\n Country : $country.";
          $message .="\n Contact Person : $cperson.";
          $message .="\n E-mail ID : $mailid.";
          $message .="\n We site address : $web.";
          $message .="\n Phone : $phone.";
          $message .="\n Fax : $fax..";
          $message .="\n---------------------------------------------";
          $sent_to = "farooqsam_786@...";
          mail($sent_to, $subject, $message );
          }
          ?>

          [Non-text portions of this message have been removed]
        • Jerry Gottesman
          Also try http://www.dtheatre.com/scripts/formmail.php
          Message 4 of 21 , Mar 2, 2004
          • David Rider
            Are you trying to send the information to your email address? If so, I found a program called phpmailer that will do that for you. It s implemented as a php
            Message 5 of 21 , Mar 5, 2004
              Are you trying to send the information to your email
              address? If so, I found a program called phpmailer
              that will do that for you. It's implemented as a php
              class and you just pass it the information from your
              form. If this is what you're trying to do let me know
              and I'll send you an example.

              dr
              --- mohammed farooq <farooqsam_786@...> wrote:
              >
              >
              > mgobi2003 <gobinathm@...> wrote: HI all,
              > I am very new to PHP programming. I would like to
              > create page which
              > will accept informations from the users and send it
              > to my ID. I have
              > tried it by many ways but i am not able to send. I
              > need to get that
              > in HTML format. Can any one give me some sample
              > programs. It will be
              > helpfull for me.
              > Thanks you,
              >
              > regarsd,
              > gobinath
              >
              >
              >
              >
              > Look here for Free PHP Classes of objects:
              > http://phpclasses.UpperDesign.com/
              >
              >
              > Yahoo! Groups SponsorADVERTISEMENT
              > Click Here
              >
              > ---------------------------------
              > Yahoo! Groups Links
              >
              > To visit your group on the web, go to:
              > http://groups.yahoo.com/group/php-objects/
              >
              > To unsubscribe from this group, send an email to:
              > php-objects-unsubscribe@yahoogroups.com
              >
              > Your use of Yahoo! Groups is subject to the
              > Yahoo! Terms of Service.
              >
              >
              >
              >
              > Yahoo! India Insurance Special: Be informed on the
              > best policies, services, tools and more.
              > ----------
              >
              > <?php
              > include("creg.php");
              >
              > $submit = @$HTTP_POST_VARS["submit"];
              > if(isset($submit))
              > {
              > $cname = @$HTTP_POST_VARS["cname"];
              > $addr = @$HTTP_POST_VARS["addr"];
              > $city = @$HTTP_POST_VARS["city"];
              > $pin = @$HTTP_POST_VARS["pin"];
              > tender_email($cname,$addr,$pin,$city);
              > }
              > ?>
              >
              > <html>
              > <head>
              > <title>Registration Form</title>
              > </head>
              > <body bgcolor="#ffffff">
              > <table width="730" border="0" cellspacing="0"
              > cellpadding="0" height="100%">
              > <form name="Reg_frm" method="POST"
              > action="register.php">
              > <table width="525" cellspacing="0"
              > cellpadding="0">
              > <tr>
              > <td width="27%" height="23">
              > Company Name :
              > </td>
              > <td width="73%" height="23">
              > <input type="text" name="cname" size="20"
              > maxlength="50" value="<?=@$cname;?>">
              > <font color="red"> *</font>
              > </td>
              > </tr>
              > <tr>
              > <td> </td>
              > </tr>
              > <tr>
              > <td width="27%" height="23">
              > Address :
              > </td>
              > <td width="73%" height="23">
              > <textarea name="addr" size="20"
              > maxlength="200"><?=@$addr;?></textarea>
              > <font color="red"> *</font>
              > </td>
              > </tr>
              > <tr>
              > <td> </td>
              > </tr>
              > <tr>
              > <td width="27%" height="23">
              > City :
              > <br>
              > </td>
              > <td width="73%" height="23">
              > <input type="text" name="city" size="20"
              > maxlength="25" value="<?=@$city ;?>">
              > </td>
              > </tr>
              > <tr>
              > <td> </td>
              > </tr>
              > <tr>
              > <td width="27%" height="23">PIN :</td>
              > <td width="73%" height="23">
              > <input type="text" name="pin" size="20"
              > maxlength="6" value="<?=@$pin;?>">
              > <font color="red"> *</font>
              > </td>
              > </tr>
              > <tr>
              > <td> </td>
              > </tr>
              > </table>
              > </body>
              > </html>
              >
              >
              >
              > ----------
              >
              > <?php
              > function
              >
              tender_email($cname,$addr,$pin,$city,$country,$cperson,$mailid,$web,$phone_ISD,$phone_STD,
              > $phone_PCO,$fax)
              > {
              > $phone = "$phone_ISD - $phone_STD -
              > $phone_PCO";
              > $subject = "Pre - Registration Form Details";
              > $message ="Pre - Registration Form Details";
              > $message .="\n
              > ---------------------------------------------";
              > $message .="\n Company Name : $cname";
              > $message .="\n Address : $addr.";
              > $message .="\n PIN : $pin.";
              > $message .="\n City : $city.;";
              > $message .="\n Country : $country.";
              > $message .="\n Contact Person : $cperson.";
              > $message .="\n E-mail ID : $mailid.";
              > $message .="\n We site address : $web.";
              > $message .="\n Phone : $phone.";
              > $message .="\n Fax : $fax..";
              > $message
              > .="\n---------------------------------------------";
              > $sent_to = "farooqsam_786@...";
              > mail($sent_to, $subject, $message );
              > }
              > ?>
              >
              > [Non-text portions of this message have been
              > removed]
              >
              >
              >


              __________________________________
              Do you Yahoo!?
              Yahoo! Search - Find what you�re looking for faster
              http://search.yahoo.com
            • Juma Lungo
              Hi my PhP database driven website is using a login form as a measure of redirecting users and administrators. The login is working perfectly but the problem is
              Message 6 of 21 , Mar 5, 2004
                Hi

                my PhP database driven website is using a login form as a measure of redirecting users and administrators. The login is working perfectly but the problem is i cant redirect the users so that admin should go the the admin page and user should go to user pager, any one to help?

                Lungo


                ---------------------------------
                Do you Yahoo!?
                Yahoo! Search - Find what you�re looking for faster.

                [Non-text portions of this message have been removed]
              • Tulga.G
                Hi, I mean if($username== admin ) { header( location: admin/index.php ); } elseif($username== user ){ header( location: user/index.php ); } ... Created by
                Message 7 of 21 , Mar 5, 2004
                  Hi, I mean

                  if($username=="admin") {
                  header("location: admin/index.php");
                  } elseif($username=="user"){
                  header("location: user/index.php");
                  }

                  -------------------------------------------------
                  Created by Tulga.G
                  Powered by Netsoft Co.,Ltd
                  Copyright 2003-2004. All rights reserved.
                  ----- Original Message -----
                  From: "Juma Lungo" <jlungo@...>
                  To: <php-objects@yahoogroups.com>
                  Sent: Saturday, March 06, 2004 3:13 PM
                  Subject: [php-objects] Redirecting users



                  Hi

                  my PhP database driven website is using a login form as a measure of
                  redirecting users and administrators. The login is working perfectly but the
                  problem is i cant redirect the users so that admin should go the the admin
                  page and user should go to user pager, any one to help?

                  Lungo


                  ---------------------------------
                  Do you Yahoo!?
                  Yahoo! Search - Find what you▓re looking for faster.

                  [Non-text portions of this message have been removed]



                  Look here for Free PHP Classes of objects:
                  http://phpclasses.UpperDesign.com/
                  Yahoo! Groups Links
                • Richard Whitney
                  You might want to share your code, but try this: after your user logs in successfully and before they are currently redirected: header( Location:admin.php ;)
                  Message 8 of 21 , Mar 5, 2004
                    You might want to share your code, but try this:

                    after your user logs in successfully and before they are currently redirected:

                    header('Location:admin.php';)

                    header('Location:user.php';)

                    Quoting Juma Lungo <jlungo@...>:

                    >
                    > Hi
                    >
                    > my PhP database driven website is using a login form as a measure of
                    > redirecting users and administrators. The login is working perfectly but the
                    > problem is i cant redirect the users so that admin should go the the admin
                    > page and user should go to user pager, any one to help?
                    >
                    > Lungo
                    >
                    >
                    > ---------------------------------
                    > Do you Yahoo!?
                    > Yahoo! Search - Find what you’re looking for faster.
                    >
                    > [Non-text portions of this message have been removed]
                    >
                    >
                    >
                    > Look here for Free PHP Classes of objects:
                    > http://phpclasses.UpperDesign.com/
                    > Yahoo! Groups Links
                    >
                    >
                    >
                    >
                    >
                    >


                    R. Whitney
                    Transcend Development
                    "Producing the next phase of your internet presence"
                    http://xend.net
                    rw@...
                    310-943-6498
                    602-288-5340
                  • Juma Lungo
                    Thanks Tulga, but this is not working. It gives an error that header already sent. where should i put these codes? Lungo Tulga.G wrote:
                    Message 9 of 21 , Mar 5, 2004
                      Thanks Tulga, but this is not working. It gives an error that header already sent. where should i put these codes?
                      Lungo

                      "Tulga.G" <tulga@...> wrote:
                      Hi, I mean

                      if($username=="admin") {
                      header("location: admin/index.php");
                      } elseif($username=="user"){
                      header("location: user/index.php");
                      }

                      -------------------------------------------------
                      Created by Tulga.G
                      Powered by Netsoft Co.,Ltd
                      Copyright 2003-2004. All rights reserved.
                      ----- Original Message -----
                      From: "Juma Lungo"
                      To:

                      Sent: Saturday, March 06, 2004 3:13 PM
                      Subject: [php-objects] Redirecting users



                      Hi

                      my PhP database driven website is using a login form as a measure of
                      redirecting users and administrators. The login is working perfectly but the
                      problem is i cant redirect the users so that admin should go the the admin
                      page and user should go to user pager, any one to help?

                      Lungo


                      ---------------------------------
                      Do you Yahoo!?
                      Yahoo! Search - Find what you�re looking for faster.

                      [Non-text portions of this message have been removed]



                      Look here for Free PHP Classes of objects:
                      http://phpclasses.UpperDesign.com/
                      Yahoo! Groups Links













                      Look here for Free PHP Classes of objects:
                      http://phpclasses.UpperDesign.com/
                      Yahoo! Groups Links






                      ---------------------------------
                      Do you Yahoo!?
                      Yahoo! Search - Find what you�re looking for faster.

                      [Non-text portions of this message have been removed]
                    • Tulga.G
                      Do u use any header function before this header function? or session? ... Created by Tulga.G Powered by Netsoft Co.,Ltd Copyright 2003-2004. All rights
                      Message 10 of 21 , Mar 5, 2004
                        Do u use any header function before this header function? or session?
                        ----------------------------------------------------------------
                        Created by Tulga.G
                        Powered by Netsoft Co.,Ltd
                        Copyright 2003-2004. All rights reserved.
                        ----- Original Message -----
                        From: "Juma Lungo" <jlungo@...>
                        To: <php-objects@yahoogroups.com>
                        Sent: Saturday, March 06, 2004 3:36 PM
                        Subject: Re: [php-objects] Redirecting users


                        Thanks Tulga, but this is not working. It gives an error that header already
                        sent. where should i put these codes?
                        Lungo

                        "Tulga.G" <tulga@...> wrote:
                        Hi, I mean

                        if($username=="admin") {
                        header("location: admin/index.php");
                        } elseif($username=="user"){
                        header("location: user/index.php");
                        }

                        -------------------------------------------------
                        Created by Tulga.G
                        Powered by Netsoft Co.,Ltd
                        Copyright 2003-2004. All rights reserved.
                        ----- Original Message -----
                        From: "Juma Lungo"
                        To:

                        Sent: Saturday, March 06, 2004 3:13 PM
                        Subject: [php-objects] Redirecting users



                        Hi

                        my PhP database driven website is using a login form as a measure of
                        redirecting users and administrators. The login is working perfectly but the
                        problem is i cant redirect the users so that admin should go the the admin
                        page and user should go to user pager, any one to help?

                        Lungo


                        ---------------------------------
                        Do you Yahoo!?
                        Yahoo! Search - Find what you▓re looking for faster.

                        [Non-text portions of this message have been removed]



                        Look here for Free PHP Classes of objects:
                        http://phpclasses.UpperDesign.com/
                        Yahoo! Groups Links













                        Look here for Free PHP Classes of objects:
                        http://phpclasses.UpperDesign.com/
                        Yahoo! Groups Links






                        ---------------------------------
                        Do you Yahoo!?
                        Yahoo! Search - Find what you▓re looking for faster.

                        [Non-text portions of this message have been removed]




                        Look here for Free PHP Classes of objects:
                        http://phpclasses.UpperDesign.com/
                        Yahoo! Groups Links
                      • Juma Lungo
                        i am using a session in this page. but thanks i can see now i am very close to solve the problem Lungo Tulga.G wrote: Do u use any header
                        Message 11 of 21 , Mar 6, 2004
                          i am using a session in this page.
                          but thanks i can see now i am very close to solve the problem
                          Lungo

                          "Tulga.G" <tulga@...> wrote:
                          Do u use any header function before this header function? or session?
                          ----------------------------------------------------------------
                          Created by Tulga.G
                          Powered by Netsoft Co.,Ltd
                          Copyright 2003-2004. All rights reserved.
                          ----- Original Message -----
                          From: "Juma Lungo"
                          To:

                          Sent: Saturday, March 06, 2004 3:36 PM
                          Subject: Re: [php-objects] Redirecting users


                          Thanks Tulga, but this is not working. It gives an error that header already
                          sent. where should i put these codes?
                          Lungo

                          "Tulga.G" wrote:
                          Hi, I mean

                          if($username=="admin") {
                          header("location: admin/index.php");
                          } elseif($username=="user"){
                          header("location: user/index.php");
                          }

                          -------------------------------------------------
                          Created by Tulga.G
                          Powered by Netsoft Co.,Ltd
                          Copyright 2003-2004. All rights reserved.
                          ----- Original Message -----
                          From: "Juma Lungo"
                          To:

                          Sent: Saturday, March 06, 2004 3:13 PM
                          Subject: [php-objects] Redirecting users



                          Hi

                          my PhP database driven website is using a login form as a measure of
                          redirecting users and administrators. The login is working perfectly but the
                          problem is i cant redirect the users so that admin should go the the admin
                          page and user should go to user pager, any one to help?

                          Lungo


                          ---------------------------------
                          Do you Yahoo!?
                          Yahoo! Search - Find what you�re looking for faster.

                          [Non-text portions of this message have been removed]



                          Look here for Free PHP Classes of objects:
                          http://phpclasses.UpperDesign.com/
                          Yahoo! Groups Links













                          Look here for Free PHP Classes of objects:
                          http://phpclasses.UpperDesign.com/
                          Yahoo! Groups Links






                          ---------------------------------
                          Do you Yahoo!?
                          Yahoo! Search - Find what you�re looking for faster.

                          [Non-text portions of this message have been removed]




                          Look here for Free PHP Classes of objects:
                          http://phpclasses.UpperDesign.com/
                          Yahoo! Groups Links











                          Look here for Free PHP Classes of objects:
                          http://phpclasses.UpperDesign.com/
                          Yahoo! Groups Links






                          ---------------------------------
                          Do you Yahoo!?
                          Yahoo! Search - Find what you�re looking for faster.

                          [Non-text portions of this message have been removed]
                        • Bob Burns
                          Lungo, You also need to make sure that no page (html) information is placed in the buffer prior to the header location function. I have found little things
                          Message 12 of 21 , Mar 6, 2004
                            Lungo,

                            You also need to make sure that no page (html) information is placed in the
                            buffer prior to the header location function. I have found little things
                            like a blank line prior to the first <? can have his result.

                            Bob

                            -----Original Message-----
                            From: Juma Lungo [mailto:jlungo@...]
                            Sent: Saturday, March 06, 2004 2:04 AM
                            To: php-objects@yahoogroups.com
                            Subject: Re: [php-objects] Redirecting users


                            i am using a session in this page.
                            but thanks i can see now i am very close to solve the problem
                            Lungo

                            "Tulga.G" <tulga@...> wrote:
                            Do u use any header function before this header function? or session?
                            ----------------------------------------------------------------
                            Created by Tulga.G
                            Powered by Netsoft Co.,Ltd
                            Copyright 2003-2004. All rights reserved.
                            ----- Original Message -----
                            From: "Juma Lungo"
                            To:

                            Sent: Saturday, March 06, 2004 3:36 PM
                            Subject: Re: [php-objects] Redirecting users


                            Thanks Tulga, but this is not working. It gives an error that header already
                            sent. where should i put these codes?
                            Lungo

                            "Tulga.G" wrote:
                            Hi, I mean

                            if($username=="admin") {
                            header("location: admin/index.php");
                            } elseif($username=="user"){
                            header("location: user/index.php");
                            }

                            -------------------------------------------------
                            Created by Tulga.G
                            Powered by Netsoft Co.,Ltd
                            Copyright 2003-2004. All rights reserved.
                            ----- Original Message -----
                            From: "Juma Lungo"
                            To:

                            Sent: Saturday, March 06, 2004 3:13 PM
                            Subject: [php-objects] Redirecting users



                            Hi

                            my PhP database driven website is using a login form as a measure of
                            redirecting users and administrators. The login is working perfectly but the
                            problem is i cant redirect the users so that admin should go the the admin
                            page and user should go to user pager, any one to help?

                            Lungo


                            ---------------------------------
                            Do you Yahoo!?
                            Yahoo! Search - Find what you’re looking for faster.

                            [Non-text portions of this message have been removed]



                            Look here for Free PHP Classes of objects:
                            http://phpclasses.UpperDesign.com/
                            Yahoo! Groups Links













                            Look here for Free PHP Classes of objects:
                            http://phpclasses.UpperDesign.com/
                            Yahoo! Groups Links






                            ---------------------------------
                            Do you Yahoo!?
                            Yahoo! Search - Find what you’re looking for faster.

                            [Non-text portions of this message have been removed]




                            Look here for Free PHP Classes of objects:
                            http://phpclasses.UpperDesign.com/
                            Yahoo! Groups Links











                            Look here for Free PHP Classes of objects:
                            http://phpclasses.UpperDesign.com/
                            Yahoo! Groups Links






                            ---------------------------------
                            Do you Yahoo!?
                            Yahoo! Search - Find what you’re looking for faster.

                            [Non-text portions of this message have been removed]




                            Look here for Free PHP Classes of objects:
                            http://phpclasses.UpperDesign.com/
                            Yahoo! Groups Links
                          • John Shanyinde
                            Problems with Header Information already sent ? Solution...Don t use Location: etc, etc For example, instead of: if($username== admin ) { header( location:
                            Message 13 of 21 , Mar 6, 2004
                              Problems with 'Header Information already sent'?
                              Solution...Don't use Location: etc, etc

                              For example, instead of:
                              if($username=="admin")
                              {
                              header("location: admin/index.php");
                              }
                              elseif($username=="user")
                              {
                              header("location: user/index.php");
                              }

                              You can safely say:
                              if($username=="admin")
                              {
                              echo '<meta http-equiv="refresh" content="0; url= admin/index.php">';
                              exit;
                              }
                              elseif($username=="user")
                              {
                              echo '<meta http-equiv="refresh" content="0; url= user/index.php">';
                              exit;
                              }

                              Hope this helps,

                              John






                              At 14:21 06/03/2004, you wrote:

                              >Lungo,
                              >
                              >You also need to make sure that no page (html) information is placed in the
                              >buffer prior to the header location function. I have found little things
                              >like a blank line prior to the first <? can have his result.
                              >
                              >Bob
                              >
                              >-----Original Message-----
                              >From: Juma Lungo [mailto:jlungo@...]
                              >Sent: Saturday, March 06, 2004 2:04 AM
                              >To: php-objects@yahoogroups.com
                              >Subject: Re: [php-objects] Redirecting users
                              >
                              >
                              >i am using a session in this page.
                              >but thanks i can see now i am very close to solve the problem
                              >Lungo
                              >
                              >"Tulga.G" <tulga@...> wrote:
                              >Do u use any header function before this header function? or session?
                              >----------------------------------------------------------------
                              >Created by Tulga.G
                              >Powered by Netsoft Co.,Ltd
                              >Copyright 2003-2004. All rights reserved.
                              >----- Original Message -----
                              >From: "Juma Lungo"
                              >To:
                              >
                              >Sent: Saturday, March 06, 2004 3:36 PM
                              >Subject: Re: [php-objects] Redirecting users
                              >
                              >
                              >Thanks Tulga, but this is not working. It gives an error that header already
                              >sent. where should i put these codes?
                              >Lungo
                              >
                              >"Tulga.G" wrote:
                              >Hi, I mean
                              >
                              >if($username=="admin") {
                              >header("location: admin/index.php");
                              >} elseif($username=="user"){
                              >header("location: user/index.php");
                              >}
                              >
                              >-------------------------------------------------
                              >Created by Tulga.G
                              >Powered by Netsoft Co.,Ltd
                              >Copyright 2003-2004. All rights reserved.
                              >----- Original Message -----
                              >From: "Juma Lungo"
                              >To:
                              >
                              >Sent: Saturday, March 06, 2004 3:13 PM
                              >Subject: [php-objects] Redirecting users
                              >
                              >
                              >
                              >Hi
                              >
                              >my PhP database driven website is using a login form as a measure of
                              >redirecting users and administrators. The login is working perfectly but the
                              >problem is i cant redirect the users so that admin should go the the admin
                              >page and user should go to user pager, any one to help?
                              >
                              >Lungo
                              >
                              >
                              >---------------------------------
                              >Do you Yahoo!?
                              >Yahoo! Search - Find what you're looking for faster.
                              >
                              >[Non-text portions of this message have been removed]
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >---------------------------------
                              >Do you Yahoo!?
                              >Yahoo! Search - Find what you're looking for faster.
                              >
                              >[Non-text portions of this message have been removed]
                              >
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >---------------------------------
                              >Do you Yahoo!?
                              >Yahoo! Search - Find what you're looking for faster.
                              >
                              >[Non-text portions of this message have been removed]
                              >
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >Yahoo! Groups Links
                              >
                              >
                              >
                              >
                              >
                              >
                              >
                              >Look here for Free PHP Classes of objects:
                              ><http://phpclasses.UpperDesign.com/>http://phpclasses.UpperDesign.com/
                              >
                              >
                              >
                              >----------
                              >Yahoo! Groups Links
                              > * To visit your group on the web, go to:
                              > *
                              > <http://groups.yahoo.com/group/php-objects/>http://groups.yahoo.com/group/php-objects/
                              >
                              > *
                              > * To unsubscribe from this group, send an email to:
                              > *
                              > <mailto:php-objects-unsubscribe@yahoogroups.com?subject=Unsubscribe>php-objects-unsubscribe@yahoogroups.com
                              >
                              > *
                              > * Your use of Yahoo! Groups is subject to the
                              > <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
                              >
                              >---
                              >Incoming mail is certified Virus Free.
                              >Checked by AVG anti-virus system (http://www.grisoft.com).
                              >Version: 6.0.598 / Virus Database: 380 - Release Date: 28/02/2004


                              ----------


                              ---
                              Outgoing mail is certified Virus Free.
                              Checked by AVG anti-virus system (http://www.grisoft.com).
                              Version: 6.0.598 / Virus Database: 380 - Release Date: 28/02/2004


                              [Non-text portions of this message have been removed]
                            • otkcotsd
                              Actually, that s not what the Header Information already sent comes from. It comes from the script already sending output to thet browser before the header
                              Message 14 of 21 , Mar 6, 2004
                                Actually, that's not what the "Header Information already sent" comes
                                from. It comes from the script already sending output to thet browser
                                before the header function is called. There are a couple of solutions
                                to this.

                                1) Don't have any white-space in your script before
                                the <?php

                                2) Don't output (echo, print, etc) anything before
                                you call the header function.

                                3) If you can't do the first 2, then you can turn on
                                output buffering. This will hold all the output until you say it
                                should be printed. This will let the headers go before any content.

                                The "Header Information already sent" message should usually be
                                accompanied by a message telling you on which line the output began.
                                This should give you a hint as to what needs to be done to satisfy #1
                                and #2.

                                Dave

                                --- In php-objects@yahoogroups.com, John Shanyinde <solavar@b...> wrote:
                                > Problems with 'Header Information already sent'?
                                > Solution...Don't use Location: etc, etc
                                >
                                > For example, instead of:
                                > if($username=="admin")
                                > {
                                > header("location: admin/index.php");
                                > }
                                > elseif($username=="user")
                                > {
                                > header("location: user/index.php");
                                > }
                                >
                                > You can safely say:
                                > if($username=="admin")
                                > {
                                > echo '<meta http-equiv="refresh" content="0; url=
                                admin/index.php">';
                                > exit;
                                > }
                                > elseif($username=="user")
                                > {
                                > echo '<meta http-equiv="refresh" content="0; url=
                                user/index.php">';
                                > exit;
                                > }
                                >
                                > Hope this helps,
                                >
                                > John
                                >
                                >
                                >
                                >
                                >
                                >
                                > At 14:21 06/03/2004, you wrote:
                                >
                                > >Lungo,
                                > >
                                > >You also need to make sure that no page (html) information is
                                placed in the
                                > >buffer prior to the header location function. I have found little
                                things
                                > >like a blank line prior to the first <? can have his result.
                                > >
                                > >Bob
                                > >
                                > >-----Original Message-----
                                > >From: Juma Lungo [mailto:jlungo@y...]
                                > >Sent: Saturday, March 06, 2004 2:04 AM
                                > >To: php-objects@yahoogroups.com
                                > >Subject: Re: [php-objects] Redirecting users
                                > >
                                > >
                                > >i am using a session in this page.
                                > >but thanks i can see now i am very close to solve the problem
                                > >Lungo
                                > >
                                > >"Tulga.G" <tulga@n...> wrote:
                                > >Do u use any header function before this header function? or session?
                                > >----------------------------------------------------------------
                                > >Created by Tulga.G
                                > >Powered by Netsoft Co.,Ltd
                                > >Copyright 2003-2004. All rights reserved.
                                > >----- Original Message -----
                                > >From: "Juma Lungo"
                                > >To:
                                > >
                                > >Sent: Saturday, March 06, 2004 3:36 PM
                                > >Subject: Re: [php-objects] Redirecting users
                                > >
                                > >
                                > >Thanks Tulga, but this is not working. It gives an error that
                                header already
                                > >sent. where should i put these codes?
                                > >Lungo
                                > >
                                > >"Tulga.G" wrote:
                                > >Hi, I mean
                                > >
                                > >if($username=="admin") {
                                > >header("location: admin/index.php");
                                > >} elseif($username=="user"){
                                > >header("location: user/index.php");
                                > >}
                                > >
                                > >-------------------------------------------------
                                > >Created by Tulga.G
                                > >Powered by Netsoft Co.,Ltd
                                > >Copyright 2003-2004. All rights reserved.
                                > >----- Original Message -----
                                > >From: "Juma Lungo"
                                > >To:
                                > >
                                > >Sent: Saturday, March 06, 2004 3:13 PM
                                > >Subject: [php-objects] Redirecting users
                                > >
                                > >
                                > >
                                > >Hi
                                > >
                                > >my PhP database driven website is using a login form as a measure of
                                > >redirecting users and administrators. The login is working
                                perfectly but the
                                > >problem is i cant redirect the users so that admin should go the
                                the admin
                                > >page and user should go to user pager, any one to help?
                                > >
                                > >Lungo
                              • plumber
                                ... send your header as header don t write something before BABA
                                Message 15 of 21 , Mar 7, 2004
                                  > Problems with 'Header Information already sent'?
                                  > Solution...Don't use Location: etc, etc
                                  >

                                  send your header as header
                                  don't write something before

                                  BABA
                                • Angel S. Moreno
                                  yea, not even a hard return ... From: plumber To: php-objects@yahoogroups.com Sent: Sunday, March 07, 2004 5:48 AM Subject: Re: [php-objects] Redirecting users
                                  Message 16 of 21 , Mar 7, 2004
                                    yea, not even a hard return
                                    ----- Original Message -----
                                    From: plumber
                                    To: php-objects@yahoogroups.com
                                    Sent: Sunday, March 07, 2004 5:48 AM
                                    Subject: Re: [php-objects] Redirecting users


                                    > Problems with 'Header Information already sent'?
                                    > Solution...Don't use Location: etc, etc
                                    >

                                    send your header as header
                                    don't write something before

                                    BABA



                                    Look here for Free PHP Classes of objects:
                                    http://phpclasses.UpperDesign.com/



                                    ------------------------------------------------------------------------------
                                    Yahoo! Groups Links

                                    a.. To visit your group on the web, go to:
                                    http://groups.yahoo.com/group/php-objects/

                                    b.. To unsubscribe from this group, send an email to:
                                    php-objects-unsubscribe@yahoogroups.com

                                    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                                    [Non-text portions of this message have been removed]
                                  • johnheinstein
                                    Hi, Why don t you try echoing some javascript that sets the location.href to the desired page? For instance:
                                    Message 17 of 21 , Mar 7, 2004
                                      Hi,

                                      Why don't you try echoing some javascript that sets the location.href
                                      to the desired page? For instance:

                                      <?php
                                      $redirectURL = "http://www.engageinteractive.com/domit/";
                                      echo ("<script language='javascript'>");
                                      echo ("document.write(location.href=\"" . $redirectURL . "\")");
                                      echo ("</script>");
                                      ?>

                                      Hope this helps,

                                      John
                                    • Vivie
                                      Hi Lungo, Does your user table in your database have a type field?? That would be the easiest way... E.G: USER TABLE: User_name User_login User_password
                                      Message 18 of 21 , Mar 7, 2004
                                        Hi Lungo,

                                        Does your user table in your database have a "type" field??

                                        That would be the easiest way...

                                        E.G:

                                        USER TABLE:

                                        User_name
                                        User_login
                                        User_password
                                        User_type

                                        So user_type could be either "admin" or "normal" and a whole multitude of
                                        others...

                                        Then it could be...

                                        PSEUDO CODE:

                                        (1) User successfully logs in
                                        (2) get user's type from database
                                        (3) Depending on user type, redirect as appropriate

                                        If you are running into the header already sent error, try a small
                                        javascript redirection...

                                        Vivie

                                        -----Original Message-----
                                        From: Tulga.G [mailto:tulga@...]
                                        Sent: Saturday, 6 March 2004 8:42 p.m.
                                        To: php-objects@yahoogroups.com
                                        Subject: Re: [php-objects] Redirecting users

                                        Do u use any header function before this header function? or session?
                                        ----------------------------------------------------------------
                                        Created by Tulga.G
                                        Powered by Netsoft Co.,Ltd
                                        Copyright 2003-2004. All rights reserved.
                                        ----- Original Message -----
                                        From: "Juma Lungo" <jlungo@...>
                                        To: <php-objects@yahoogroups.com>
                                        Sent: Saturday, March 06, 2004 3:36 PM
                                        Subject: Re: [php-objects] Redirecting users


                                        Thanks Tulga, but this is not working. It gives an error that header already
                                        sent. where should i put these codes?
                                        Lungo

                                        "Tulga.G" <tulga@...> wrote:
                                        Hi, I mean

                                        if($username=="admin") {
                                        header("location: admin/index.php");
                                        } elseif($username=="user"){
                                        header("location: user/index.php");
                                        }

                                        -------------------------------------------------
                                        Created by Tulga.G
                                        Powered by Netsoft Co.,Ltd
                                        Copyright 2003-2004. All rights reserved.
                                        ----- Original Message -----
                                        From: "Juma Lungo"
                                        To:

                                        Sent: Saturday, March 06, 2004 3:13 PM
                                        Subject: [php-objects] Redirecting users



                                        Hi

                                        my PhP database driven website is using a login form as a measure of
                                        redirecting users and administrators. The login is working perfectly but the
                                        problem is i cant redirect the users so that admin should go the the admin
                                        page and user should go to user pager, any one to help?

                                        Lungo


                                        ---------------------------------
                                        Do you Yahoo!?
                                        Yahoo! Search - Find what you-re looking for faster.

                                        [Non-text portions of this message have been removed]



                                        Look here for Free PHP Classes of objects:
                                        http://phpclasses.UpperDesign.com/
                                        Yahoo! Groups Links













                                        Look here for Free PHP Classes of objects:
                                        http://phpclasses.UpperDesign.com/
                                        Yahoo! Groups Links






                                        ---------------------------------
                                        Do you Yahoo!?
                                        Yahoo! Search - Find what you-re looking for faster.

                                        [Non-text portions of this message have been removed]




                                        Look here for Free PHP Classes of objects:
                                        http://phpclasses.UpperDesign.com/
                                        Yahoo! Groups Links











                                        Look here for Free PHP Classes of objects:
                                        http://phpclasses.UpperDesign.com/
                                        Yahoo! Groups Links
                                      • Fadjar Nurswanto
                                        You re right with your method. But if programmer using debuging like in adodb, the debug message cannot display correctly. fn http://www.rindudendam.com
                                        Message 19 of 21 , Mar 8, 2004
                                          You're right with your method.
                                          But if programmer using debuging like in adodb, the debug message cannot
                                          display correctly.

                                          fn
                                          http://www.rindudendam.com


                                          On Sat, 2004-03-06 at 16:12, John Shanyinde wrote:
                                          > Problems with 'Header Information already sent'?
                                          > Solution...Don't use Location: etc, etc
                                          >
                                          > For example, instead of:
                                          > if($username=="admin")
                                          > {
                                          > header("location: admin/index.php");
                                          > }
                                          > elseif($username=="user")
                                          > {
                                          > header("location: user/index.php");
                                          > }
                                          >
                                          > You can safely say:
                                          > if($username=="admin")
                                          > {
                                          > echo '<meta http-equiv="refresh" content="0; url= admin/index.php">';
                                          > exit;
                                          > }
                                          > elseif($username=="user")
                                          > {
                                          > echo '<meta http-equiv="refresh" content="0; url= user/index.php">';
                                          > exit;
                                          > }
                                          >
                                          > Hope this helps,
                                          >
                                          > John
                                        • Derek Scruggs
                                          ... And you can also use headers_sent() to write a function to do either one based on whether the headers have been sent already. function
                                          Message 20 of 21 , Mar 8, 2004
                                            > If you are running into the header already sent error, try a
                                            > small javascript redirection...

                                            And you can also use headers_sent() to write a function to do either one
                                            based on whether the headers have been sent already.

                                            function my_redirect($location) {
                                            if(headers_sent()) {
                                            echo ("<script language='javascript'>");
                                            echo ("document.write(location.href=\"" . $location . "\")"); echo
                                            ("</script>");
                                            } else {
                                            header($location);
                                            }
                                            }

                                            $url='http://www.example.com';
                                            my_redirect($url);
                                          • Jeff Bennett
                                            Nice, Derek. I didn t know that trick. -j ... http://www.meta-language.net/
                                            Message 21 of 21 , Mar 8, 2004
                                              Nice, Derek. I didn't know that trick.

                                              -j


                                              > > If you are running into the header already sent error, try a
                                              > > small javascript redirection...
                                              >
                                              > And you can also use headers_sent() to write a function to do either one
                                              > based on whether the headers have been sent already.
                                              >
                                              > function my_redirect($location) {
                                              > if(headers_sent()) {
                                              > echo ("<script language='javascript'>");
                                              > echo ("document.write(location.href=\"" . $location . "\")"); echo
                                              > ("</script>");
                                              > } else {
                                              > header($location);
                                              > }
                                              > }
                                              >
                                              > $url='http://www.example.com';
                                              > my_redirect($url);
                                              >
                                              >
                                              >
                                              > PHP Data object relational mapping generator -
                                              http://www.meta-language.net/
                                              > Yahoo! Groups Links
                                              >
                                              >
                                              >
                                              >
                                              >
                                            Your message has been successfully submitted and would be delivered to recipients shortly.