Jump to content

Recommended Posts

i have a logon page where i make the client select the type of form to fill out but i get an eror everytime i run it

pls help

 

error:

Warning: Cannot modify header information - headers already sent by

 

 

script:

 

<title>Type de membre</title>

 

 

              <?php $choice = $_POST['type']; //Use addslashes(  ); around the $_POST var to increase security

 

if( $choice == "1" ){

 

  header( 'location: /regroupement.php' );

  exit;

 

}

if( $choice == "2" ){

 

  header( 'location: /cpe.php' );

  exit;

 

}

?>

<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" name="type" id="type">

  <table border="0" width="100%" cellspacing="0" cellpadding="2">

    <tr>

      <td class="MenuMaqSec"><p><span class="smallText"><font color="red"><b>Attention!</b></font> Veuillez remplir un sondage par Installation </span><br />

      </p>

      <table border="0" width="100%" cellspacing="0" cellpadding="2">

        <tr>

          <td class="inputRequirement">* L'astérisque après un champ indique que l'information doit être  obligatoirement saisie.<br />

              <br /></td>

        </tr>

        <tr>

          <td class="MenuMaqSec"><strong>Type de membres</strong></td>

        </tr>

      </table>

      <table border="0" cellspacing="2" cellpadding="2">

        <tr>

          <td width="514" class="MenuMaqSec2">Type : </td>

          <td width="203" class="MenuMaqSec"><label></label>

              <label>

              <select name="type" id="type">

                <option selected>--Choisir--</option>

                <option value="1">Regroupement</option>

                <option value="2">CPE</option>

              </select>

              <span class="inputRequirement">*</span></label></td>

             

 

        </tr>

        <!-- <input type="hidden" name="province" id="province" value="76" maxlength="32"> -->

      </table>

      <br />

      <table width="768" border="0" cellspacing="0" cellpadding="0" bgcolor="b7d9e9">

        <tr>

          <td height="43" valign="middle"><div align="center">

              <label>

              <input type="submit" name="submit" id="submit" value="submit">

              </label>

          </div></td>

        </tr>

      </table>

      <br />

<p> </p></td>

    </tr>

  </table>

  </form>

  </body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/55195-solved-help-php-form/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.