{MySQL} changer script de répertoire
Résolu
netanonima
Messages postés
37
Statut
Membre
-
netanonima Messages postés 37 Statut Membre -
netanonima Messages postés 37 Statut Membre -
Bonsoir, j'ai un amis qui m'a crée un script php faisant appel à du mysql qui fonctionne très bien.
Cependant j'aimerai le changer de repertoire. J'adapte le chemin aux fichiers (includes) mais ça me donne une erreur de variable dans config.php à la ligne 1.
Connaissez-vous ce problème? help
Cependant j'aimerai le changer de repertoire. J'adapte le chemin aux fichiers (includes) mais ça me donne une erreur de variable dans config.php à la ligne 1.
Connaissez-vous ce problème? help
A voir également:
- {MySQL} changer script de répertoire
- Changer dns - Guide
- Script vidéo youtube - Guide
- Changer de carte graphique - Guide
- Changer extension fichier - Guide
- Changer wifi chromecast - Guide
9 réponses
et le contenu de l'erreur s'il te plait plus le code source sans les mot de passe et identifiants...
Le script va très bien sur :
http://www.altordj.com/pokatest/sbpoker.php
Je recopie sbpoker.php config.php et sbupdate.php dans un autre repertoire et ça me donne :
http://www.altordj.com/poker/05/sbpoker.php
Le scripte de sbpoker.php :
http://www.altordj.com/pokatest/sbpoker.php
Je recopie sbpoker.php config.php et sbupdate.php dans un autre repertoire et ça me donne :
http://www.altordj.com/poker/05/sbpoker.php
Le scripte de sbpoker.php :
<head>
<style type="text/css">
.style1 {
text-align: center;
}
</style>
</head>
<?php
include("config.php");
mysql_connect("$dbhost", "$dblogin", "$dbpassword");
mysql_select_db("$dbname");
$query = 'SELECT * FROM '.$dbtable3.';
$result = mysql_query($query);
?>
<form action="sbupdate.php" method="post">
<table align=center aligncellpadding=0 border=1 cellspacing=0>
<tr>
<td width="75" align=left><B>Joueur</B></td>
<td width="40" align=right><B>Jan.</B></td>
<td width="40" align=right><B>Fév.</B></td>
<td width="40" align=right><B>Mars</B></td>
<td width="40" align=right><B>Avr.</B></td>
<td width="40" align=right><B>Mai</B></td>
<td width="40" align=right><B>Juin</B></td>
<td width="40" align=right><B>Juil.</B></td>
<td width="40" align=right><B>Août</B></td>
<td width="40" align=right><B>Sept.</B></td>
<td width="40" align=right><B>Oct.</B></td>
<td width="40" align=right><B>Nov.</B></td>
<td width="40" align=right><B>Déc.</B></td>
<?php //Supprimer la ligne ci-dessous pour enlever l'option de suppression ?>
<td width="40" align=right><B>Suppr.</B></td>
</tr>
<?php
$i=0;
$n=0;
while ($val = mysql_fetch_array($result)) {
// ------------------------------------------
// DONNEES A AFFICHER dans les cellules
echo '<input type="hidden" name="ID['.$i.']" value="'.$val['id'].'">';
echo '<tr>';
echo '<td width="75" align=left><input type=text name=Joueur['.$i.'] size=6 value="'.$val['joueur'].'"></td>';
echo '<td width="40" align=right><input type=text name=Janvier['.$i.'] size=1 value="'.$val['janvier'].'"></td>';
echo '<td width="40" align=right><input type=text name=Fevrier['.$i.'] size=1 value="'.$val['fevrier'].'"></td>';
echo '<td width="40" align=right><input type=text name=Mars['.$i.'] size=1 value="'.$val['mars'].'"></td>';
echo '<td width="40" align=right><input type=text name=Avril['.$i.'] size=1 value="'.$val['avril'].'"></td>';
echo '<td width="40" align=right><input type=text name=Mai['.$i.'] size=1 value="'.$val['mai'].'"></td>';
echo '<td width="40" align=right><input type=text name=Juin['.$i.'] size=1 value="'.$val['juin'].'"></td>';
echo '<td width="40" align=right><input type=text name=Juillet['.$i.'] size=1 value="'.$val['juillet'].'"></td>';
echo '<td width="40" align=right><input type=text name=Aout['.$i.'] size=1 value="'.$val['aout'].'"></td>';
echo '<td width="40" align=right><input type=text name=Septembre['.$i.'] size=1 value="'.$val['septembre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Octobre['.$i.'] size=1 value="'.$val['octobre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Novembre['.$i.'] size=1 value="'.$val['novembre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Decembre['.$i.'] size=1 value="'.$val['decembre'].'"></td>';
//Supprimer la ligne ci-dessous pour enlever l'option de suppression
echo '<td width="40" align=center><input type=checkbox name=Chk['.$i.']></td>';
echo '</tr>';
$n = $i;
$i++;
// ------------------------------------------
}
?>
</table>
<?php
mysql_close();
?>
<input type="hidden" name="n" value="<?php echo $n; ?>">
<br>
<div class="style1">
<input type="submit" name="envoie" value="Modifier">
</div>
</form>
** Tu traite les informations stp dans un script inon gare aux hack$
enlève la ligne de commentaire n°37
enlève la ligne de commentaire n°37
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
Parse error: syntax error, unexpected T_STRING in /mnt/sites/altordj.com/web/poker/05/sbpoker.php on line 52
Ligne 52:
echo '<input type=hidden name=ID['.$i.'] value='.$val['id'].'>';
Ligne 52:
echo '<input type=hidden name=ID['.$i.'] value='.$val['id'].'>';
Parse error: syntax error, unexpected '>' in /mnt/sites/altordj.com/web/poker/05/sbpoker.php on line 53
ligne53 :
echo '<tr>';
loool
Le script once again :
<head>
<style type="text/css">
.style1 {
text-align: center;
}
</style>
</head>
<?php
include("config.php");
mysql_connect("$dbhost", "$dblogin", "$dbpassword");
mysql_select_db("$dbname");
$query = 'SELECT * FROM '.$dbtable3.';
$result = mysql_query($query);
?>
<form action="sbupdate.php" method="post">
<table align=center aligncellpadding=0 border=1 cellspacing=0>
<tr>
<td width="75" align=left><B>Joueur</B></td>
<td width="40" align=right><B>Jan.</B></td>
<td width="40" align=right><B>Fév.</B></td>
<td width="40" align=right><B>Mars</B></td>
<td width="40" align=right><B>Avr.</B></td>
<td width="40" align=right><B>Mai</B></td>
<td width="40" align=right><B>Juin</B></td>
<td width="40" align=right><B>Juil.</B></td>
<td width="40" align=right><B>Août</B></td>
<td width="40" align=right><B>Sept.</B></td>
<td width="40" align=right><B>Oct.</B></td>
<td width="40" align=right><B>Nov.</B></td>
<td width="40" align=right><B>Déc.</B></td>
<?php
//Supprimer la ligne ci-dessous pour enlever loption de suppression
?>
<td width="40" align=right><B>Suppr.</B></td>
</tr>
<?php
$i=0;
$n=0;
while ($val = mysql_fetch_array($result)) {
// ------------------------------------------
// DONNEES A AFFICHER dans les cellules
echo "<input type=hidden name=ID['.$i.'] value='.$val['id'].'>";
echo '<tr>';
echo '<td width="75" align=left><input type=text name=Joueur['.$i.'] size=6 value="'.$val['joueur'].'"></td>';
echo '<td width="40" align=right><input type=text name=Janvier['.$i.'] size=1 value="'.$val['janvier'].'"></td>';
echo '<td width="40" align=right><input type=text name=Fevrier['.$i.'] size=1 value="'.$val['fevrier'].'"></td>';
echo '<td width="40" align=right><input type=text name=Mars['.$i.'] size=1 value="'.$val['mars'].'"></td>';
echo '<td width="40" align=right><input type=text name=Avril['.$i.'] size=1 value="'.$val['avril'].'"></td>';
echo '<td width="40" align=right><input type=text name=Mai['.$i.'] size=1 value="'.$val['mai'].'"></td>';
echo '<td width="40" align=right><input type=text name=Juin['.$i.'] size=1 value="'.$val['juin'].'"></td>';
echo '<td width="40" align=right><input type=text name=Juillet['.$i.'] size=1 value="'.$val['juillet'].'"></td>';
echo '<td width="40" align=right><input type=text name=Aout['.$i.'] size=1 value="'.$val['aout'].'"></td>';
echo '<td width="40" align=right><input type=text name=Septembre['.$i.'] size=1 value="'.$val['septembre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Octobre['.$i.'] size=1 value="'.$val['octobre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Novembre['.$i.'] size=1 value="'.$val['novembre'].'"></td>';
echo '<td width="40" align=right><input type=text name=Decembre['.$i.'] size=1 value="'.$val['decembre'].'"></td>';
//Supprimer la ligne ci-dessous pour enlever l'option de suppression
echo '<td width="40" align=center><input type=checkbox name=Chk['.$i.']></td>';
echo '</tr>';
$n = $i;
$i++;
// ------------------------------------------
}
?>
</table>
<?php
mysql_close();
?>
<input type="hidden" name="n" value="<?php echo $n; ?>">
<br>
<div class="style1">
<input type="submit" name="envoie" value="Modifier">
</div>
</form>