Mini moteur de recherche php
superjojo01
Messages postés
459
Date d'inscription
Statut
Membre
Dernière intervention
-
Dalida Messages postés 6728 Date d'inscription Statut Contributeur Dernière intervention -
Dalida Messages postés 6728 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, voila, j'ai créer ma page php ...
deux probleme, comment faire pour assemble deux page php.
ex :
chois de langue :
( bouton radio ) français
( bouton radio ) english
( bouton radio ) espana
( bouton radio ) italia
valider
mais c'est bon j'ai le code html pour sa mais je n'arrive pas a m'étre ma page,
voici le code de la page :
<?php
$jour = date("d");
$mois = date("m");
$annee = date("Y");
echo "Bonjour, Nous sommes le $jour/$mois/$annee."
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Sky search / language</title>
<meta name="ROBOTS" content="all">
<meta name="keywords"
content="mot clé 1,mot cle 2,Mot clé 3, Mots clefs">
<meta name="title" content="titre de votre page">
</head>
<body
style="height: 485px; color: rgb(0, 0, 0); background-color: rgb(147, 171, 255);"
alink="#000099" link="#000099" vlink="#990099">
<div style="text-align: center;">
<form style="height: 306px;" action="pagecible.php"
method="post">
<h1 style="text-align: center;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Sky
search :</span></h1>
<div style="text-align: center;"> Bienvenue, Dans sky
search.</div>
<div style="text-align: center;"> le moteur de recherche
disponible a tous moments.</div>
<br>
<h3 style="font-weight: normal; text-align: center;">Language :</h3>
<script language="javascript" type="text/javascript">
function redirection() {
if(document.getElementsByName('btnradio')[0].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[1].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[2].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[3].checked == true) document.location.href='';
}
</script>
<div style="text-align: center;"><input
name="btnradio" id="btnradio" value="0"
type="radio"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Français</span><br>
<input name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">English</span><br>
<span =""><input name="btnradio" id="btnradio"
value="1" type="radio"><span
style="font-style: italic;">Espana</span></span><br>
<span =""><span style="font-style: italic;">
</span><span style="font-style: italic;"></span><span
style="font-style: italic;"></span><span =""><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">Italia</span></span></span><br>
<span =""><span =""></span></span></div>
<span =""><span =""> <br>
</span></span>
<div style="text-align: center;"><span =""><span
=""><span style="font-style: italic;"></span><input
name="btn_envoi" onclick="redirection()" value="Valider"
type="button"></span></span><span =""><span
=""></span><span =""></span><span
=""></span><span =""></span><span
=""></span> </span><br>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span style="font-style: italic;"></span><span
style="font-style: italic;"></span><br>
<span style="font-style: italic;"></span></form>
</div>
</body>
</html>
et je voudrais que des que l'on selectionne français puis valider on aille a la page français...
et aussi je voudrais faire une barre comme google, ou l'on pourais mettre un mot :
ex :
manger :
et sa nous proposerais gateau, frite ...
mais si on mais boire ,
il nous proposerais :
coca jus d'orange...
voicile code de la page du moteur :
<?php
$jour = date("d");
$mois = date("m");
$annee = date("Y");
echo "Bonjour, Nous sommes le $jour/$mois/$annee.";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>français</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(147, 171, 255);"
alink="#000099" link="#000099" vlink="#990099">
<div style="text-align: center;">
<div style="text-align: right;">
<div style="text-align: center;">
<h1><span style="font-style: italic;"><span
style="font-family: Times New Roman,Times,serif;"></span></span><span
style="font-style: italic; font-family: Times New Roman,Times,serif;"><span
style="font-weight: bold;"></span></span><span
style="font-weight: normal; font-style: italic;">Sky search :</span></h1>
</div>
</div>
<span style="font-family: Times New Roman,Times,serif;"><span
style="font-style: italic;"><span
style="font-weight: bold;"><br>
<br>
<br>
<br>
</span></span></span>
<form method="get" action="maintenance.html"> <input
name="part" value="bb9834d4-9e38-102b-a565-0030489045d4"
type="hidden"><input name="engine" value=""
type="hidden"> <input name="q" value=""
style="border: 1px solid rgb(22, 0, 153); height: 20px; width: 200px;"
type="text"><input name="search" value="Rechercher"
type="submit"></form>
<br
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">
<h3 style="font-weight: normal; height: 9px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">Maintenance
en cours,</span></h3>
<h3 style="font-weight: normal; height: 9px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">merci
de ne pas utiliser sky search.</span></h3>
<h3 style="font-weight: normal; height: 8px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">une
nouvelle version de php plus puisante est en création.</span></h3>
<form
style="font-family: Times New Roman,Times,serif; font-style: italic;"
.="">
<h2><br>
<span
style="font-style: italic; font-family: Times New Roman,Times,serif; font-weight: normal;"></span></h2>
<h2><span
style="font-style: italic; font-family: Times New Roman,Times,serif; font-weight: normal;">Sky
search vous intéresse ?</span> </h2>
<script language="javascript" type="text/javascript">
function redirection() {
if(document.getElementsByName('btnradio')[0].checked == true) document.location.href='sondage%20ok.html';
if(document.getElementsByName('btnradio')[1].checked == true) document.location.href='sondage%20ok.html';
if(document.getElementsByName('btnradio')[2].checked == true) document.location.href='sondage%20ok.html';
}
</script><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Oui</span>
<input name="btnradio" id="btnradio" value="0"
type="radio"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;"></span><br>
<span style="font-style: italic;">Bof </span><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;"></span><br>
<span =""><span style="font-style: italic;">Non</span><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">
</span><span style="font-style: italic;"></span><span
style="font-style: italic;"></span><span =""><span
style="font-style: italic;"></span><br>
<br>
<span style="font-style: italic;"></span><input
name="btn_envoi" onclick="redirection()" value="Valider"
type="button"></span></span><span =""><span
=""></span><span =""></span><span
=""></span><span =""></span><span
=""></span> </span><br>
<br>
Les resutats du sondage resterons annonymes,<br>
seul les résultats seronts accesible.</form>
<br>
<br>
<br>
<span style="text-decoration: underline;"></span>
</div>
</body>
</html>
deux probleme, comment faire pour assemble deux page php.
ex :
chois de langue :
( bouton radio ) français
( bouton radio ) english
( bouton radio ) espana
( bouton radio ) italia
valider
mais c'est bon j'ai le code html pour sa mais je n'arrive pas a m'étre ma page,
voici le code de la page :
<?php
$jour = date("d");
$mois = date("m");
$annee = date("Y");
echo "Bonjour, Nous sommes le $jour/$mois/$annee."
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Sky search / language</title>
<meta name="ROBOTS" content="all">
<meta name="keywords"
content="mot clé 1,mot cle 2,Mot clé 3, Mots clefs">
<meta name="title" content="titre de votre page">
</head>
<body
style="height: 485px; color: rgb(0, 0, 0); background-color: rgb(147, 171, 255);"
alink="#000099" link="#000099" vlink="#990099">
<div style="text-align: center;">
<form style="height: 306px;" action="pagecible.php"
method="post">
<h1 style="text-align: center;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Sky
search :</span></h1>
<div style="text-align: center;"> Bienvenue, Dans sky
search.</div>
<div style="text-align: center;"> le moteur de recherche
disponible a tous moments.</div>
<br>
<h3 style="font-weight: normal; text-align: center;">Language :</h3>
<script language="javascript" type="text/javascript">
function redirection() {
if(document.getElementsByName('btnradio')[0].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[1].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[2].checked == true) document.location.href='';
if(document.getElementsByName('btnradio')[3].checked == true) document.location.href='';
}
</script>
<div style="text-align: center;"><input
name="btnradio" id="btnradio" value="0"
type="radio"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Français</span><br>
<input name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">English</span><br>
<span =""><input name="btnradio" id="btnradio"
value="1" type="radio"><span
style="font-style: italic;">Espana</span></span><br>
<span =""><span style="font-style: italic;">
</span><span style="font-style: italic;"></span><span
style="font-style: italic;"></span><span =""><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">Italia</span></span></span><br>
<span =""><span =""></span></span></div>
<span =""><span =""> <br>
</span></span>
<div style="text-align: center;"><span =""><span
=""><span style="font-style: italic;"></span><input
name="btn_envoi" onclick="redirection()" value="Valider"
type="button"></span></span><span =""><span
=""></span><span =""></span><span
=""></span><span =""></span><span
=""></span> </span><br>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span style="font-style: italic;"></span><span
style="font-style: italic;"></span><br>
<span style="font-style: italic;"></span></form>
</div>
</body>
</html>
et je voudrais que des que l'on selectionne français puis valider on aille a la page français...
et aussi je voudrais faire une barre comme google, ou l'on pourais mettre un mot :
ex :
manger :
et sa nous proposerais gateau, frite ...
mais si on mais boire ,
il nous proposerais :
coca jus d'orange...
voicile code de la page du moteur :
<?php
$jour = date("d");
$mois = date("m");
$annee = date("Y");
echo "Bonjour, Nous sommes le $jour/$mois/$annee.";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>français</title>
</head>
<body
style="color: rgb(0, 0, 0); background-color: rgb(147, 171, 255);"
alink="#000099" link="#000099" vlink="#990099">
<div style="text-align: center;">
<div style="text-align: right;">
<div style="text-align: center;">
<h1><span style="font-style: italic;"><span
style="font-family: Times New Roman,Times,serif;"></span></span><span
style="font-style: italic; font-family: Times New Roman,Times,serif;"><span
style="font-weight: bold;"></span></span><span
style="font-weight: normal; font-style: italic;">Sky search :</span></h1>
</div>
</div>
<span style="font-family: Times New Roman,Times,serif;"><span
style="font-style: italic;"><span
style="font-weight: bold;"><br>
<br>
<br>
<br>
</span></span></span>
<form method="get" action="maintenance.html"> <input
name="part" value="bb9834d4-9e38-102b-a565-0030489045d4"
type="hidden"><input name="engine" value=""
type="hidden"> <input name="q" value=""
style="border: 1px solid rgb(22, 0, 153); height: 20px; width: 200px;"
type="text"><input name="search" value="Rechercher"
type="submit"></form>
<br
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">
<h3 style="font-weight: normal; height: 9px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">Maintenance
en cours,</span></h3>
<h3 style="font-weight: normal; height: 9px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">merci
de ne pas utiliser sky search.</span></h3>
<h3 style="font-weight: normal; height: 8px;"><span
style="font-family: Times New Roman,Times,serif; font-style: italic; color: rgb(255, 0, 0);">une
nouvelle version de php plus puisante est en création.</span></h3>
<form
style="font-family: Times New Roman,Times,serif; font-style: italic;"
.="">
<h2><br>
<span
style="font-style: italic; font-family: Times New Roman,Times,serif; font-weight: normal;"></span></h2>
<h2><span
style="font-style: italic; font-family: Times New Roman,Times,serif; font-weight: normal;">Sky
search vous intéresse ?</span> </h2>
<script language="javascript" type="text/javascript">
function redirection() {
if(document.getElementsByName('btnradio')[0].checked == true) document.location.href='sondage%20ok.html';
if(document.getElementsByName('btnradio')[1].checked == true) document.location.href='sondage%20ok.html';
if(document.getElementsByName('btnradio')[2].checked == true) document.location.href='sondage%20ok.html';
}
</script><span
style="font-family: Times New Roman,Times,serif; font-style: italic;">Oui</span>
<input name="btnradio" id="btnradio" value="0"
type="radio"><span
style="font-family: Times New Roman,Times,serif; font-style: italic;"></span><br>
<span style="font-style: italic;">Bof </span><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;"></span><br>
<span =""><span style="font-style: italic;">Non</span><input
name="btnradio" id="btnradio" value="1"
type="radio"><span style="font-style: italic;">
</span><span style="font-style: italic;"></span><span
style="font-style: italic;"></span><span =""><span
style="font-style: italic;"></span><br>
<br>
<span style="font-style: italic;"></span><input
name="btn_envoi" onclick="redirection()" value="Valider"
type="button"></span></span><span =""><span
=""></span><span =""></span><span
=""></span><span =""></span><span
=""></span> </span><br>
<br>
Les resutats du sondage resterons annonymes,<br>
seul les résultats seronts accesible.</form>
<br>
<br>
<br>
<span style="text-decoration: underline;"></span>
</div>
</body>
</html>
A voir également:
- Mini moteur de recherche php
- Opera mini pc - Télécharger - Navigateurs
- Recherche automatique des chaînes ne fonctionne pas - Guide
- Google moteur de recherche page d'accueil - Guide
- Copernic moteur de recherche - Télécharger - Navigateurs
- Recherche de pairs utorrent ✓ - Forum Téléchargement
5 réponses
Salut :)
Et si tu fais un switch avec en défaut la page de recherche ça ne va pas ?
je m'explique tu doit avoir une page réponse celle qui t'affiche le résultat et une page de recherche
Donc en gros si j'ai bien compris ça donnerais ça :
par contre je sais pas si ca marche car pas expert :) lol
href="index.php?page=resultat" avec ton bouton valider
Et après la ou faut que le resultat s'affiche tu mets :
<?php
switch($_GET['page'])
{
case 'news' :
include "resultat.php";
break;
default:
include "recherche.php";
break;
}?>
Vala désolé si ca ne t'aide pas :)
Et si tu fais un switch avec en défaut la page de recherche ça ne va pas ?
je m'explique tu doit avoir une page réponse celle qui t'affiche le résultat et une page de recherche
Donc en gros si j'ai bien compris ça donnerais ça :
par contre je sais pas si ca marche car pas expert :) lol
href="index.php?page=resultat" avec ton bouton valider
Et après la ou faut que le resultat s'affiche tu mets :
<?php
switch($_GET['page'])
{
case 'news' :
include "resultat.php";
break;
default:
include "recherche.php";
break;
}?>
Vala désolé si ca ne t'aide pas :)
Pfff, mais ce que j'aime pas dans NOTEPADE++, c'est que ya vraiment que du script !
se que je voudrais, c'est quelque chose, ou l'on peut vous la page a coter, comme un aperçu,
personne ne connais un éditeur comme sa ?
se que je voudrais, c'est quelque chose, ou l'on peut vous la page a coter, comme un aperçu,
personne ne connais un éditeur comme sa ?
En faite la meilleur soluce c'est que tu utilise notepad++ car rien de mieux pour apprendre par contre tu as une solution pour visualiser tes pages avant de les diffuser sur le net :)
Utilise wamp ça te permet de tester ton site sur ton pc avant de le diffuser :)
Utilise wamp ça te permet de tester ton site sur ton pc avant de le diffuser :)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
et je vais ou pour prendre wamp ???
pour te donner un aperçu de son niveau en PHP.
avant de poster à tout va, il faudrait que superjojo01 se décide à apprendre et surtout à lire.
donc, que ce soit google, ou yahoo , sa ne m'aidera pas ;
mais merci quand même de m'avoir répondu, c'était simpa
commence par faire du HTML correct sans aucune fonctionnalité (même pas de Javascript) et ensuite et seulement ensuite commence à ajouter les éléments dynamiques (langue, recherche…).
comme ça au fur et à mesure de ton avancement tu pourra demander de l'aide sur des points bien précis.
pour le moment tu n'as même pas une page propre et tu parles de faire un moteur de recherche, c'est comme si tu nous demandais comment piloter une fusée sans même avoir le BSR.
j'ai ma page html,
j'ai ajouter :
<?php
$jour = date("d");
$mois = date("m");
$annee = date("Y");
echo "Bonjour, Nous sommes le $jour/$mois/$annee.";
?>
et sa ne my affiche pas dans ma page html, faut vraiment que jy mette en forma php ?!