Rechercher : dans
Par :

Convertir des fichiers HTML en fichier PHP

Dernière réponse le 5 jan 2008 à 15:51:57 athium28, le 3 jan 2008 à 13:50:51 
 Signaler ce message aux modérateurs

Bonjour,

bonjour a tous , je suis entrain de faire un site et j'aimerais y ajouter un formulaire de contact donc ma page contact devra etre en php or ttes mes pages st en html et il faut donc que je convertisse la page contact en fichier php vu qu'elle est pr le moment en html , le probleme etant que je ne sais pas comment je peux le faire (convertir un fichier html en fichier php )

merci par avance pour vos reponses, merci d'expliciter que je suis une jeune debutante

merci
athium28

Configuration: Windows vista
Internet Explorer 7.0

Meilleures réponses pour « convertir des fichiers HTML en fichier PHP » dans :
[PHP] Upload de fichiers VoirLe langage PHP permet de gérer des fichiers envoyés (uploadés) grâce à un formulaire HTML. Formulaire d'envoi de fichiers Configuration de PHP pour permettre l'upload Récupération du fichier avec PHP Formulaire d'envoi de fichiers La...
Excel - Convertir fichier(s) CSV / XLS VoirComme dit dans le titre, cette application convertit des fichiers CSV en fichiers XLS N’est pas nécessaire pour Excel 2007, ce dernier faisant la conversion automatiquement La conversion n’ayant pas de mise en forme, en cas de modification...
PHP - Les fichiers VoirLa gestion des fichiers avec PHP Avec PHP, la création ou la lecture de fichiers est, une fois de plus, assez simple. Il existe une multitude de fonctions dédiées à l'utilisation des fichiers. La communication entre le script PHP et le fichier...

1

iceangel, le 3 jan 2008 à 13:54:48

En fait tu peut pas convertir il faut que tu fasse du PHP pur
www.siteduzero.com
les barrettes de RAM ça ce change pas a chaud

Répondre à iceangel

2

athium28, le 5 jan 2008 à 14:32:08

RE
pourtant j'ai vu plein de pages html qui ont des formulaires de contact donc cela veut dire qu'elles ont seulement une partie php ?
voila je vs donne mon code
en fait ce que j'aimerais une fois que le formulaire est rempli est qu'il donne sur une page comme quoi il a bien été pris en compte et blabla... lol!!
et ah oui il y a des carac obligatoires est ce que vs pouvez m'expliquer comment les rendre obligatoire avec quels codes ? et si une personne omet d'en remplir un comment on met une phrase d'erreur comme quoi le formulaire est incomplet

Voici mon code, merci d'avance a+ Melissa

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Voyages Malaval - formulaire de contacts</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="754" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" bgcolor="FFFBE3" style="height:791 "><table width="754" border="0" cellspacing="0" cellpadding="0" style="height:100%; background-image:url(images/bgs_1_1.gif); background-repeat:no-repeat ">
<tr>
<td valign="top" style="background-image:url(images/bgs_1_2.gif); background-repeat:no-repeat; background-position:bottom; height:100% "><table width="754" border="0" cellspacing="0" cellpadding="0" style="height:100% ">
<tr>
<td valign="top" style="height:176; "><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="754" height="176">
<param name="movie" value="Menu.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="Menu.swf"
width="754" height="176" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object></td>
</tr>
<tr>
<td valign="top" style="height:471 "><table width="754" border="0" cellspacing="0" cellpadding="0" style="height:100% ">
<tr>
<td width="335" valign="top" style="height:100% "><table width="325" border="0" cellspacing="0" cellpadding="0" style="margin-left:8px; height:100% ">
<tr>
<td valign="top" style="height:241 "><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="325" height="240">
<param name="movie" value="Banner.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<!--[if !IE]> <-->
<object data="Banner.swf"
width="325" height="240" type="application/x-shockwave-flash">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object>
<!--> <![endif]-->
</object></td>
</tr>

<tr>
<td valign="top" bgcolor="6699CC" style="height:100% "><table width="325" border="0" cellspacing="0" cellpadding="0" style="height:100%; background-image:url(images/bgs_2_1.gif); background-repeat:no-repeat ">
<tr>
<td valign="top" style="background-image:url(images/bgs_2_2.gif); background-position:bottom; background-repeat:no-repeat "><table width="325" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" style="height:55; padding-top:4px "><table width="317" border="0" cellpadding="0" cellspacing="0" bgcolor="557FAA">
<tr>
<td width="57" valign="top"><img src="images/t_6.gif" width="48" height="41" alt=""></td>
<td width="260" valign="top"><table width="260" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="height:26; padding-top:7px "><font color="#FF0000" face="Stencil">pour
nous joindre rapidement
</font> </td>
</tr>
<tr>
<td valign="top" class="tit">  </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="text_2" style="height:111 "><table width="325" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190" height="99" valign="top">
<div align="center"><img src="car/415%20hdh/SN200350%20%5BR%E9solution%20de%20l%27%E9cran%5D%20%5B%5D.JPG" width="151" height="99"></div></td>
<td width="135" valign="top" class="text_1" style="padding-top:4px ">
<div align="center"><font color="#FFFFFF"><strong><font size="2">vous
pouvez à tout moment nous joindre
aux numeros suivants :</font>
</strong></font></div></td>
</tr>
</table>
<p align="center"><font size="2">téléphone
principal :<font color="#FF0000">
04 66 32 60 01</font></font><font size="1">
( horaires de bureaux <strong>)<br>
<font size="2">téléphone d'urgence
: <font color="#FF0000">06 08 06 45
04 </font>( 24h/24)<br>
</font></strong></font><font color="3399cc" size="2">.</font><font size="2"><br>
FAX :<font color="#FF0000"> 04 66
32 83 96 <br>
</font><font color="3399cc">.</font><br>
</font><font size="2">E-mail : <a href="mailto: contacts@voyages-malaval.com">
contacts@voyages-malaval.com</a></font></p>
</td>
</tr>
<tr>
<td valign="top" class="text_1" style="padding-left:60px "><span class="text_2">
</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>

</table></td>
<td width="419" valign="top" style="height:100% "><table width="410" border="0" cellspacing="0" cellpadding="0" style="height:100% ">
<tr>
<td height="369" valign="top" bgcolor="3399CC" style="height:239 ">
<table width="410" height="90%" border="0" cellpadding="0" cellspacing="0" style="height:100%; background-image:url(images/bgs_4_1.gif); background-repeat:no-repeat ">
<tr>
<td height="348" valign="top" style="background-image:url(images/bgs_4_2.gif); background-position:bottom; background-repeat:no-repeat; padding-top:5px ">
<table width="410" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" style="height:44 "><table width="402" border="0" cellpadding="0" cellspacing="0" bgcolor="2A7FAA">
<tr>
<td width="57" valign="top"><img src="images/t_7.gif" width="48" height="41" alt=""></td>
<td width="345" valign="top"><table width="345" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="height:26; padding-top:7px ">
<div align="center"><font color="#FF0000" face="Stencil">
NOS ADRESSES...</font></div></td>
</tr>
<tr>
<td valign="top" class="tit"> 
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="top" style="height:20 "><div align="center"><font color="#FFFFFF" size="3"><strong>Nos
bureaux principaux : </strong></font></div></td>
</tr>
<tr>
<td align="center" valign="top" style="height:20 "><div align="center"><font color="#FFFFFF" size="3"><strong>
<font color="#FF0000">Voyages Malaval<br>
Chemin du geant<br>
48 100 MARVEJOLS</font></strong></font></div></td>
</tr>
<tr>
<td height="85" align="center" valign="top" style="height:20 ">
<div align="center">
<img src="images/pic_15.jpg" width="218" height="79"></div></td>
</tr>
<tr>
<td align="center" valign="top" style="height:20 "><div align="center"><font color="#FFFFFF" size="3"><strong>Nos
bureaux secondaires et notre parc
de véhicules:</strong></font></div></td>
</tr>
<tr>
<td align="center" valign="top" style="height:20 "><font color="#FFFFFF" size="3"><strong><font color="#FF0000">Autocars
Malaval<br>
route de l'Aubrac<br>
48 340 SAINT GERMAIN DU TEIL</font></strong></font></td>
</tr>
<tr>
<td height="32" valign="top" class="text_1" style="height:32; padding-left:20px "></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" style="height:2 "><img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td height="221" valign="top" bgcolor="6699CC" style="height:100% ">
<table width="410" height="70%" border="0" cellpadding="0" cellspacing="0" style="height:100%; background-image:url(images/bgs_6_1.gif); background-repeat:no-repeat ">
<tr>
<td height="187" valign="top" style="background-image:url(images/bgs_6_2.gif); background-position:bottom; background-repeat:no-repeat; padding-top:5px ">
<table width="410" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" style="height:63 "><table width="402" border="0" cellpadding="0" cellspacing="0" bgcolor="557FAA">
<tr>
<td width="57" valign="top"><img src="images/t_8.gif" width="48" height="41" alt=""></td>
<td width="345" valign="top"><table width="345" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="height:26; padding-top:7px "><div align="center"><font color="#FF0000" face="Stencil">CREé
pour vous, ce formulaire
...</font></div></td>
</tr>
<tr>
<td valign="top" class="tit"><b>Une
question, un renseignement,
une demande, ... ?</b></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="text_1" style="height:32; padding-left:21px "><div align="center"><font size="2"><b class="texte_noir">Vous
venez de visiter notre site et il
vous reste encore quelques points
noirs, quelques interrogations, vous
souhaiteriez qu'un de nos conseillers
vous renseignent ou vous aimeriez
qu'un de nos commerciaux viennent
vous rencontrer au sein de votre structure,
alors laissez nous un message. Nous
vous répondrons par mail ou
nous vous contacterons par téléphone
suivant vos désirs. <br>
Merci, toute l'équipe des
Voyages Malaval ...</b></font></div></td>
</tr>
<tr>
<td height="19" valign="top"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" style="height:2 "><img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td valign="top" style="height:100%; padding-bottom:13px "><table width="737" border="0" cellspacing="0" cellpadding="0" style="margin-left:8px; height:100% ">
<tr>
<td valign="top" bgcolor="3399CC" style="height:100% "><table width="737" border="0" cellspacing="0" cellpadding="0" style="height:100%; background-image:url(images/bgs_7_1.gif); background-repeat:no-repeat ">
<tr>
<td valign="top" style="background-image:url(images/bgs_7_2.gif); background-position:bottom; background-repeat:no-repeat; padding-top:4px "><table width="737" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" style="height:58 "><table width="729" border="0" cellpadding="0" cellspacing="0" bgcolor="2A7FAA">
<tr>
<td width="57" valign="top"><img src="images/t_9.gif" width="48" height="41" alt=""></td>
<td width="672" valign="top"><table width="673" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="673" valign="top" style="height:26; padding-top:7px "><div align="center"><font color="#FF0000" face="Stencil">bulletin
de contact</font></div></td>
</tr>
<tr>
<td valign="top" class="tit"><strong>Merci
de renseigner les cases suivantes
pour une réponse rapide .... (
* mentions obligatoires )</strong></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" valign="top"><table width="674" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="315" valign="top" class="text_1"><p><strong>Vous
êtes* :
<select name="vous etes*" id="vous etes*">
<option>particulier</option>
<option>entreprise</option>
<option>association</option>
<option>amicale</option>
<option>club</option>
<option>comité d'établissement</option>
<option>futur employé</option>
<option>institutions publiques</option>
<option>AUTRES</option>
</select>
</strong></p>
<p><strong>Votre nom* :
<input name="textfield" type="text" size="30">
</strong></p>
<p><strong>Votre prenom* :
<input name="textfield2" type="text" size="27">
</strong></p>
<p><strong>Votre Structure :
<input name="textfield4" type="text" size="26">
</strong></p>
<p><strong>Votre statut dans cette structure
:
<input name="textfield3" type="text" value="" size="10">
</strong></p>
<p><strong>Votre e-mail* :
<input name="textfield5" type="text" size="28">
</strong></p>
<p><strong>Votre téléphone :
<input name="textfield6" type="text" size="25">
</strong></p>
<p><strong>Votre fax :
<input name="textfield10" type="text" size="32">
</strong></p>
<p><strong>Votre adresse* :
<input name="textfield7" type="text" size="26">
</strong></p>
<p><strong>CP* :
<input name="textfield8" type="text" size="4">
Votre ville* :
<input name="textfield9" type="text" size="15">
</strong></p>
<p><strong>renseignements complementaires
:</strong> </p>
<form name="form1" method="post" action="">
<textarea name="textarea" cols="33"></textarea>
</form>
<p align="left"><strong>si vous desirez
nous envoyer un fichier en pièce-jointe
: </strong></p>
<p align="left">
<input type="file" name="file">
</p>
<p> </p>
<p><span class="text_2"></span></p>
<font size="2">  </font></td>
<td width="10" valign="top" style="background-image:url(images/ln_1.gif); background-repeat:repeat-y "> </td>
<td width="349" valign="top" class="text_1"><form name="form2" method="post" action="">
<p><strong>L'objet de votre contact*
: </strong></p>
<p>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
Des questions sur les voyages</label>
<br>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
Des questions sur le paiement en
ligne </label>
<br>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
Vous voulez organiser un voyage</label>
<br>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
Demande et envoi de documentation
par mail ou papier</label>
<br>
<label>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
</label>
Question concernant le transport
en autocar <br>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
Question concernant les hotels et
visites <br>
<input type="radio" name="Groupe de boutons radio1" value="bouton radio">
<label>Autres</label>
</p>
<p>
<label> </label>
<label>si autres, merci de préciser</label>
</p>
<p>
<label>
<textarea name="textarea2" cols="33"></textarea>
</label>
<br>
</p>
<p align="center"><strong>COMMENTAIRES
:</strong></p>
<p>
<textarea name="textarea3" cols="33"></textarea>
</p>
<p><strong>information interne et
complémentaire : </strong></p>
<p><strong>vous nous avez connu par
:
<select name="select">
<option>télévision</option>
<option>radio</option>
<option>article de presse</option>
<option>publicité écrite</option>
<option>mailing</option>
<option>envoi de tract</option>
<option>amis</option>
<option>localisation geographique</option>
</select>
</strong></p>
<p><strong>Des remarques sur nous
ou sur notre site sont les bienvenues
!</strong></p>
<p><strong>
<textarea name="textarea4" cols="33"></textarea>
</strong></p>
<p> </p>
<p align="center"><strong> <font color="3399cc">
</font>
<input type="submit" name="Submit" value="Envoyer">
</strong></p>
</form>
<span class="text_2"> </span></td>
</tr>
<tr>
<td valign="top" class="text_1"> </td>
<td valign="top" style="background-image:url(images/ln_1.gif); background-repeat:repeat-y "> </td>
<td valign="top" class="text_1"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" style="height:72; padding-top:14px; background-image:url(images/copy_ln.gif); background-repeat:no-repeat "><table width="754" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10">  </td>
<td width="10" valign="top" class="copy_1"><strong> </strong><a href="index-7.html" class="copy_1"></a></td>
<td width="241" valign="top" class="copy_1"><div align="center"><strong>©
2008</strong> All rights reserved<br>
   <a href="index-7.html" class="copy_1"> Mentions legales</a></div></td>
<td width="482" valign="top" class="copy_1"><p><a href="index.html" class="copy_1">
Accueil</a>  |  <a href="index-1.html" class="copy_1">La
société</a> |  <a href="index-2.html" class="copy_1">Destinations</a>
 |  <a href="index-3.html" class="copy_1">Special groupes</a> | 
<a href="index-4.html" class="copy_1">Mon compte</a> | 
<a href="index-5.html" class="copy_1">Devis</a>  |  <a href="index-6.html" class="copy_1">Contactez-nous</a></p></td>
<td width="11" valign="top" class="copy_1"><a href="index.html" class="copy_1">
</a><a href="index-6.html" class="copy_1"></a></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Répondre à athium28

3

CHAP26, le 5 jan 2008 à 14:48:47

Bonjour,

Contrairement à ce que te dis iceangel, tu peux tout à fait mixer du html et du php.

Par contre pour que du code php s'exécute, il faudra que ton fichier n'est plus une extension .html ou .htm mais une extension .php.
Il faudra aussi que ton hébergeur supporte php ;-)))

Dans ton cas, tu laisses ta page qui contient le formulaire en .html ou .htm et dans le form tu renvoies vers ta page en php contenant la fonction mail.
Ton form actuel :
<form name="form1" method="post" action="">

Le form que tu devrais avoir
<form name="form1" method="post" action="ma_page_php.php">
ma_page_php.php étant la page contenant la fonction mail de php.

Attention si ton site est hébergé chez Free, la fonction mail a été quelque peut manipulé par Free pour des raisons de spam, soi-disant.

Cordialement

David
-------
http://www.chapdaniel.fr

Répondre à CHAP26

4

RAD ZONE, le 5 jan 2008 à 14:50:46
  • +1

SALUT

c est tres simple !!

tu renome ta page.html en ta page .php et tu mets les balise php a l endrois de ton formulaire php

exemple

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">        
  <head>                          
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />             
    <title>    
    </title>     
  </head>     
  <body>
    <p>ton code html normal
    </p>
    
<?php
   print "Hello world! RAD";
  ?> 
    
    <p>ton code html normal
    </p>  
  </body>
</html>


RAD

♣ La plus grande erreur que puisse faire un homme est d'avoir peur d'en faire une. ♣

Répondre à RAD ZONE

5

athium28, le 5 jan 2008 à 15:45:36

Merci rad zone pr ces infos mais comment je fais pour la renommer ou je vais ?

Répondre à athium28

6

 athium28, le 5 jan 2008 à 15:51:57

Re chap26, merci pour tes infos, je t'ai laissé un mp sur ton site

Répondre à athium28
Collection CommentÇaMarche.net