sethupathy Posted June 12, 2007 Share Posted June 12, 2007 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> Quote Link to comment https://forums.phpfreaks.com/topic/55195-solved-help-php-form/ Share on other sites More sharing options...
trq Posted June 12, 2007 Share Posted June 12, 2007 Did you read the sticky titled HEADER ERRORS.....? Quote Link to comment https://forums.phpfreaks.com/topic/55195-solved-help-php-form/#findComment-272855 Share on other sites More sharing options...
sethupathy Posted June 12, 2007 Author Share Posted June 12, 2007 sorry guys for wasting bandwith Problem SOLVED thanks for the LINK you rock Quote Link to comment https://forums.phpfreaks.com/topic/55195-solved-help-php-form/#findComment-272858 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.