Probleme avec formulaire!

Bonjour,

En ce moment je cherche un moyen de crée un formulaire, que les membres remplisse et me l’envoi a mon mail. Et ensuite je l’ajouterai dans l’espace membre. Faire tout automatiquement et trop compliqué pour le moment.

Je suis tombé sur un site qui peut servir a plusieur débutant comme moi. Avec un formulaire tres simple et qui demande pas de donne MySql.

http://www.salemioche.net/script-php-1.php

J’ai tout fait comme c’était indiqué, et ca fonctionne. Mais y’as juste un probleme. Lorseque j’envoi le formulaire normalement je devrais etre redirection vers une page de remerciment ( merci.html ) sur le site il explique qu’il faut l’indiquer comme ceci :

Header(“Location: http://www.monsite.com/merci.html”);

Je l’ai fait, mais quand j’envoi le formulaire je ne suis pas redirection vers cette page, ya une erreur :

Warning: Cannot modify header information - headers already sent by (output started at /var/www/free.fr/9/6/flavieflament/formulaire/formmail.php:12) in /var/www/free.fr/9/6/flavieflament/formulaire/formmail.php on line 25

J’ai vérifié la ligne 25 de formail.php et c’est correct… donc je comprend pas trop :frowning:

Merci de me donner un petit coup de main… j’ai l’impression que c’est tout bete.

Merci

Steve

merci de préciser le langage utilisé dans le titre de ton topic :jap:

Tu ne peux pas utiliser Location: (entête) si tu as déjà affiché quelque chose dans la page (corps), même un espace blanc…

Erreur fréquente ->
colle <?php tout en haut de ta page .php

faut RIEN avant…meme pas un espace


<?php
header(...);
...
?>
<html>
...

Merci pour votre aide :slight_smile: Ca fonctionne !

Bonne journée :wink:

J’ai un autre petit souci, je crée pas de nouveau topic pour. Enfaite j’ai script pour enregistrer des membres. Les membres ajoute leurs pseudo et pass et il se redirectionne vers leurs page concerner.
Le probleme c’est que les page sont en .php3 et mon site contient des frames, et j’aimerai que quand il se connecte leur page s’affiche au centre du site comme les autres.

Le probleme c’est que quand on valide, ben au lieu de la page concerner il y a cette erreur :

Warning: main(zonemembre/login.php3.php): failed to open stream: No such file or directory in /var/www/free.fr/9/6/flavieflament/index.php on line 59

Warning: main(): Failed opening ‘zonemembre/login.php3.php’ for inclusion (include_path=’/var/www/free.fr/9/6/flavieflament/include:.’) in /var/www/free.fr/9/6/flavieflament/index.php on line 59

Donc la on voi bien le prob " login.php3.php’ " pour lui la page c’est une page PHP qui s’apelle login.php3

Je comprend pas trop le probleme :frowning:

Merci

dernier avertissement

Ou l’edit comment ?

en cliquant sur http://forum.clubic.com/themes_static/images/defaut/edit.gif sur le 1er post de ton topic, tu auras un menu deroulant avec differents langages proposés

Ok c’est fait :slight_smile: dsl du retard.

Personne a une idée pour mon prob ?

cf. message de quazardous.

pardon ?

Rien. Pour ton prob, montre le code où tu inclus la page, et p-e l’arbo.

Ok, donc ca c’est le code de la page qui doit s’afficher au milieu :


<html>

<head>
<title>Goofy12</title>

</head>
<body>
<?
require("protec/passe/conf.php3");
$db_link = mysql_connect($sql_serveur,$sql_user,$sql_passwd);

// SELECTION DE L'ENREGISTREMENT CONTENANT L'ID EN COURS
$requete=mysql_db_query($sql_bdd,"select * from membre where id=\"$id\"",$db_link);

// SI L'ID N'EXISTE PAS
if(mysql_num_rows($requete)==0)
	{
	header("Location:$url_erreur");
	}
	
?>



<table border="1" width="500" cellpadding="0" cellspacing="0" height="0" summary="">
	<tr>
		<td>
		
		<div align="center">[b]<font face="Arial" size="4" color="#000000">Goofy12</font>[/b]
		
		<br><br>
		
		
		
		
		
		
		
		
		
		
		
		
		
		</div>

		
		
		
		
<br><br>



</body>



</div>
		
		</td>
	</tr>
</table>








</body>
</html>

Et ca c’est l’index :


<html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<body bgcolor="#C9D9E7">

</head>
<body>
<table width="800" cellpadding="4" cellspacing="0" align="center" border="0">
	<tr>
		<td colspan="3" width="800">
		
		
		
		
		<table width="800" cellpadding="0" cellspacing="0" height="150" border="0" summary="">
			<tr>
				<td><img src="images/banniere/banhomegauche.png" border="0" width="400" height="150" alt=""></td>
				<td><img src="images/banniere/banhomedroit.png" border="0" width="400" height="150" alt=""></td>
				
			</tr>
		</table>
		
		
		
		
		
		</td>
	</tr>
	
	<tr>
		<td width="150">
		
		<table width="150" cellpadding="0" cellspacing="0" height="400" border="0" summary="">
			<tr>
				<td>
				
				<img src="images/banniere/lesite.png" border="0" cellpadding="0" cellspacing="0" width="150" height="37" alt=""><br>
<img src="images/banniere/accueil.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/news.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/lejeu.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/circuits.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/voitures.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/contacts.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/finitiongauche.png" border="0" cellpadding="0" cellspacing="0" width="150" height="4" alt=""><br>
				
				
				
				</td>
			</tr>
		</table>
		

		
		</td>
		<td width="650" cellpadding="0" cellspacing="0" align="center" valign="top">
		
		
<?php if (!$page){$page='accueil';}
include (''.$page.'.php');?>

<td>

<img src="images/banniere/championnats.png" border="0" cellpadding="0" cellspacing="0" width="150" height="37" alt=""><br>
<img src="images/banniere/formule1.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/rally.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/indycar.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/nascar.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/motogp.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/autres.png" border="0" cellpadding="0" cellspacing="0" width="150" height="59" alt=""><br>
<img src="images/banniere/finitiondroit.png" border="0" cellpadding="0" cellspacing="0" width="150" height="4" alt=""><br>
</td>


		</td>
	</tr>
</table>


<a href="index.php?page=test" class="sidelink">Test[/url]<br>


</body>
</html>

Cherche plus :

[cpp]<?php if (!$page){$page=‘accueil’;}
include (’’.$page.’.php’);?>
[/cpp]

Vire le ‘.php’ qui traîne derrière page.

Je l’ai enlever et maintenant ya cette erreur

Parse error: parse error, unexpected ‘)’ in /var/www/free.fr/9/6/flavieflament/index.php on line 59

quand je vais sur le site.

[cpp]include($page);[/cpp]

J’ai remplacer :


<?php if (!$page){$page='accueil';}
include (''.$page.'.php');?>

PAR :


<?php if (!$page){$page='accueil';}
include($page);?>

Et y’as cette erreur maintenant :



Warning: main(accueil): failed to open stream: No such file or directory in /var/www/free.fr/9/6/flavieflament/index.php on line 59

Warning: main(): Failed opening 'accueil' for inclusion (include_path='/var/www/free.fr/9/6/flavieflament/include:.') in /var/www/free.fr/9/6/flavieflament/index.php on line 59

http://flavieflament.free.fr/ l’adresse du serveur