Probléme d'hébergement avec IfRANCE (marche toujours pas...)
Posté : 12 août 2006, 18:51
Alors voila je vous explique mon probléme :
J'utilise IFrance, et quand je veut mettre ce code la :
Erreur
Il semble qu'il y ait une erreur dans votre requête SQL. Le message ci-bas peut vous aider à en trouver la cause.
ERROR: Ponctuation invalide @ 3
STR: <?
SQL: #
<?php
#
if(!isset($_POST['text']))
#
{?>
#
<form method="post">
#
<textarea name="text" rows="10" cols="40" onFocus="if(this.value == 'Texte') this.value='';">Texte</textarea><br />
#
<input type='submit' value='Go !' />
#
</form><?php
#
}
#
#
else
#
#
{
#
#
$colors{2} = '009933';
requête SQL:
# #
# Texte
# #
MySQL a répondu:Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
if(!isset($_POST['text']))
{?>
<form method="post">
' at line 1
La ou il y'a écrit texte, c'est la qu'il y'a le tableau que je veut obtenir, mais seul...
Je ne sais pas comment faire, mais pourtant le code est correct...
Donc si vous pourriez m'aider...
J'utilise IFrance, et quand je veut mettre ce code la :
#
<?php
if(!isset($_POST['text']))
{?>
<form method="post">
<textarea name="text" rows="10" cols="40" onFocus="if(this.value == 'Texte') this.value='';">Texte</textarea><br />
<input type='submit' value='Go !' />
</form><?php
}
else
{
$colors{2} = '009933';
$colors{3} = '006699';
$colors{4} = '990033';
$colors{5} = 'CC9966';
$colors{6} = '6699CC';
$colors{7} = 'CC3399';
$colors{8} = '3300CC';
$colors{9} = '996633';
$colors{10} = 'FF9900';
$colors{11} = '008080';
for($i = 15; $i <= 24; $i )
{$colors{$i} = $colors{$i-13};}
$colors{27} = 'FFFF00';
$colors{28} = '999999';
$colors{29} = '996600';
$colors{30} = 'FF0000';
$j = 0;
for($i = 0; $i < strlen($_POST['text']); $i )
{
if($_POST['text']{$i} == "\r")
{$j ;}
elseif($_POST['text']{$i} == "\n")
{;}
else
{$rows{$j} .= $_POST['text']{$i};}
}
$rows{0} = '<span style="font-weight:bold; color:blue;">'.$rows{0}.'</span>';
$rows{13} = '<span style="font-weight:bold; color:#000000;">'.$rows{13}.'</span>';
$rows{26} = '<span style="font-weight:bold; color:#000000;">'.$rows{26}.'</span>';
?><div align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:12px;"><?php
for($i = 0; $i <= $j; $i )
{
if(isset($colors{$i}))
{
$tmp = '<span style="color:#'.$colors{$i}.'">';
$ok = false;
for($k = 0; $k < strlen($rows{$i}); $k )
{
if(strpos('1234567890', $rows{$i}{$k}) === false || $ok == true)
{$tmp .= $rows{$i}{$k};}
else
{$tmp .= '</span>'.$rows{$i}{$k}; $ok = true;}
}
$rows{$i} = $tmp;
}
echo($rows{$i}."<br />\n");
}
?></div><?php
}?>
Et bien j'obtiens ca :Erreur
Il semble qu'il y ait une erreur dans votre requête SQL. Le message ci-bas peut vous aider à en trouver la cause.
ERROR: Ponctuation invalide @ 3
STR: <?
SQL: #
<?php
#
if(!isset($_POST['text']))
#
{?>
#
<form method="post">
#
<textarea name="text" rows="10" cols="40" onFocus="if(this.value == 'Texte') this.value='';">Texte</textarea><br />
#
<input type='submit' value='Go !' />
#
</form><?php
#
}
#
#
else
#
#
{
#
#
$colors{2} = '009933';
requête SQL:
# #
# Texte
# #
MySQL a répondu:Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<?php
if(!isset($_POST['text']))
{?>
<form method="post">
' at line 1
La ou il y'a écrit texte, c'est la qu'il y'a le tableau que je veut obtenir, mais seul...
Je ne sais pas comment faire, mais pourtant le code est correct...
Donc si vous pourriez m'aider...