Jump to content

[SOLVED] help php form


sethupathy

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.