I got a problem when i try to update a field in the database, it don't want to save. is there something wrong with this?(the links to the db are correct)
$QueryUpdate = "UPDATE ConfigImages
SET
Titre= ".$_POST["Titre"].",
CouleurTitre=".$_POST["CouleurTitre"].",
SizeTitre=".$_POST["SizeTitre"].",
ImageBack=".$_POST["ImageBack"].",
CouleurBack=".$_POST["CouleurBack"].",
FlecheG=".$_POST["FlecheG"].",
FlecheD=".$_POST["FlecheD"].",
CouleurTexte=".$_POST["CouleurTexte"].",
SizeTexte=".$_POST["SizeTexte"]."
WHERE Section = ".$Section."
;";
mysql_query($QueryUpdate,$db);Forget it, the problem was that I didn't put quotes.don't you just love it when it's that easy! Yep, hope it would be always like this but it's not.:crying:
I got another problem.
I'm trying to put Submit=False(in bold) in the adress bar, but with the get method, it doesn't work and i have no idea why. With post it work fine, but my code won't work with it.
Any idea why it doesn't show?
<form name="LstSection" method="get" action="<?php
printf("%s?ListeSection=%s&Submit=False",$_SERVER['PHP_SELF'],$_GET["ListeSection"]);?>">
<label>Sé—ÂÂ榚ctionner la section ?modifier :</label>
<select name="ListeSection" onchange="document.LstSection.submit();">
<?php
if($myrow = mysql_fetch_array($result))
{
for($iCtr=1; $iCtr <=$Num; $iCtr++)
{
if ($myrow["Section"] == $_GET["ListeSection"])
{
printf("<option Selected = True>%s</option>",$myrow["Section"]);
}
else
{
printf("<option>%s</option>",$myrow["Section"]);
}
$myrow = mysql_fetch_array($result);
}
}
?>
</select>
</form>
$QueryUpdate = "UPDATE ConfigImages
SET
Titre= ".$_POST["Titre"].",
CouleurTitre=".$_POST["CouleurTitre"].",
SizeTitre=".$_POST["SizeTitre"].",
ImageBack=".$_POST["ImageBack"].",
CouleurBack=".$_POST["CouleurBack"].",
FlecheG=".$_POST["FlecheG"].",
FlecheD=".$_POST["FlecheD"].",
CouleurTexte=".$_POST["CouleurTexte"].",
SizeTexte=".$_POST["SizeTexte"]."
WHERE Section = ".$Section."
;";
mysql_query($QueryUpdate,$db);Forget it, the problem was that I didn't put quotes.don't you just love it when it's that easy! Yep, hope it would be always like this but it's not.:crying:
I got another problem.
I'm trying to put Submit=False(in bold) in the adress bar, but with the get method, it doesn't work and i have no idea why. With post it work fine, but my code won't work with it.
Any idea why it doesn't show?
<form name="LstSection" method="get" action="<?php
printf("%s?ListeSection=%s&Submit=False",$_SERVER['PHP_SELF'],$_GET["ListeSection"]);?>">
<label>Sé—ÂÂ榚ctionner la section ?modifier :</label>
<select name="ListeSection" onchange="document.LstSection.submit();">
<?php
if($myrow = mysql_fetch_array($result))
{
for($iCtr=1; $iCtr <=$Num; $iCtr++)
{
if ($myrow["Section"] == $_GET["ListeSection"])
{
printf("<option Selected = True>%s</option>",$myrow["Section"]);
}
else
{
printf("<option>%s</option>",$myrow["Section"]);
}
$myrow = mysql_fetch_array($result);
}
}
?>
</select>
</form>