je suis débutant en php/sql et je suis actuelement dans l'élaboration d'un site de referencement de liens simple.
je souhaiterai créer une page d'ajouts de liens fesant apel a un api
le concept : on entre le titre, on lance la recherche dans l'api, le resultat s'affiche dans un formulaire ou l'ont rajoute deux trois détail manquand puis on envoi le touts dans ma bdd
je vous affiche ci_dessou le code source de ma page qui reccupere les info de l'api dans le formulaire et la structure de ma table dans ma bdd
Pourriez vous m'indiquez se que je doit ajouter pour que tous se qui est dans le formulaire s'ajoute correctement dans ma base de donne .
voici mon code source de ma page
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="styles.css" type="text/css">
</head><body>
<table align="center">
<tr>
<td><FONT face="Comic Sans MS" color=#FFffff size=3>Ceci est une page prototype <br>
Touts les details ne se transmette pas toujours lors de l'envoi des donnée<br>
il y a une donnée qui ne se transmet pas (celle du résumer) copier le texte a droite de la case resumer<br></font></td>
</tr>
<tr>
[php]<?php
$film_dem = ( empty($_POST['film_dem']) ) ? '' : $_POST['film_dem'];
echo '
<center><form method="post" action="">
<p><input type="texte" name="film_dem" value="' . $film_dem . '" /><strong><FONT face="Comic Sans MS" color=#FFffff size=3> <<< Entrez le titre du films et cliquer sur la touche entrer de votre clavier .</font></strong></p>
</form></center>
';
if ( $film_dem != '' ) {
// Inclure le fichier de l'API
include_once('API_Allocine.php');
// Récupération des infos
$film = getMovieByKeywordsSimple($film_dem, ', ');
echo var_dump($film);
echo '<center>
<table align="center" width="800">
<form action="essai004.php" method="post">
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Réentrer le titre de votre films</font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="titre" value="" /></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>sortie en : </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="annee" value="' . $film['annéeProduction'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Réalisé par : </font></td>
<td width="250" align="center"<FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="realisateur" value="' .$film['réalisateurs'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Les acteurs Principaux sont : </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="acteur" value="' . $film['acteurs'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Genre de films : </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="genre" value="' . $film['genres'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Durée du films : </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="duree" value="' . $film['durée'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Résumé de se films : </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="synopsy" value="' . $film['synopsis'] . '" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Vérifier l image du films</font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><img src="' . $film['posterHref'] . '" style="width: 150px; weight: 250px;" /></font></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>ceci est l adresse de l image</td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name="image" value="' . $film['posterHref'] . '" /></font></td></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Hebergeur </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><select name="hebergeur"value="" />
<option>videobb</option>
<option>megavideo</option>
<option>megaupload</option>
<option>autres</option>
</select><br></font></td></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2> votre liens </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><input type="text" name=" " value=" " /></font></td></td>
</tr>
<tr>
<td width="200" align="center"><FONT face="Comic Sans MS" color=#FF0000 size=2>Qualiter </font></td>
<td width="250" align="center"><FONT face="Comic Sans MS" color=#FFFFFF size=2><select name="qualiter" value=" " />
<option>Dvd</option>
<option>BlueRay</option>
<option>3D</option>
<option>TS</option>
<option>Cam</option>
</select><br></font></td></td>
</tr>
<tr>
<td width="200" align="center"></td>
<td width="250" align="center"><input type="submit" value="Envoyer seulement si les infos ci-dessou sont bonnes" /></td>
</tr>
</form>
</table>
</center>
';
}
else {
echo '<strong><center><FONT face="Comic Sans MS" color=#ffffff size=2>Entrez un titre de film et cliquez sur la touche entrer de votre clavier!</font></center></strong>';
}
?>[/php]
</td>
</tr>
</table>
</body></head></html>
et voici ma table de ma bddCREATE TABLE IF NOT EXISTS `bddjbtv` (
`id` bigint(20) NOT NULL,
`annee` varchar(4) default NULL,
`genre` varchar(15) default NULL,
`ajouteur` varchar(30) default 'Anonyme',
`titre` varchar(70) NOT NULL,
`langue` varchar(5) default 'VF',
`image` varchar(250) default 'http://www.jbtvstreaming.fr/images/indisponible.jpg',
`realisateur` varchar(100) default NULL,
`acteur` varchar(100) default NULL,
`duree` varchar(5) default NULL,
`synopsy` varchar(250) default NULL,
`hebergeur` varchar(250) NOT NULL,
`liens` varchar(250) NOT NULL,
`qualiter` varchar(6) default 'dvd',
`nombre` smallint(6) default NULL,
`vue_apres` int(20) NOT NULL,
`date_d_ajout` date NOT NULL,
`commentaire1` varchar(250) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Je vous remerci d'avance !!!