leonthelion
10-29-2006, 06:27 AM
trying to load a bunch of variables from Flash into mysql. I can dynamically target the database column names easily enough, but can't do the same for the $_POST variables... any help?
I just want to replace the 1 character with variable $e contents throughout most of the _POST references
$e=1;
$sql="INSERT INTO projects
(date,
time,
name,
text1Text,
text1X,
text1Y,
text1Font,
pickMaterial,
shape,
pickThickness,
pickQty ,
backgroundColour,
text1Background,
xtraImg".$e."Name,
xtraImg".$e."X,
xtraImg".$e."Y,
xtraImg".$e."Width,
xtraImg".$e."Height,
xtraImg".$e."Alpha,
xtraImg".$e."Rotation,
xtraImg".$e."originalWidth,
xtraImg".$e."originalHeight,
xtraImg".$e."originalX,
xtraImg".$e."originalY,
xtraImg".$e."originalAlpha,
xtraImg".$e."originalRotation) VALUES
('$scoredate',
'$scoretime',
'$_POST[projectName]',
'$_POST[text1Text]',
'$_POST[text1X]',
'$_POST[text1Y]',
'$_POST[text1Font]',
'$_POST[pickMaterial]',
'$_POST[shape]',
'$_POST[pickThickness]',
'$_POST[pickQty]',
'$_POST[backgroundColour]',
'$_POST[text1Background]',
'$_POST[xtraImg1Name]',
'$_POST[xtraImg1X]',
'$_POST[xtraImg1Y]',
'$_POST[xtraImg1Width]',
'$_POST[xtraImg1Height]',
'$_POST[xtraImg1Alpha]',
'$_POST[xtraImg1Rotation]',
'$_POST[xtraImg1originalWidth]',
'$_POST[xtraImg1originalHeight]',
'$_POST[xtraImg1originalX]',
'$_POST[xtraImg1originalY]',
'$_POST[xtraImg1originalAlpha]',
'$_POST[xtraImg1originalRotation]')" ;
I just want to replace the 1 character with variable $e contents throughout most of the _POST references
$e=1;
$sql="INSERT INTO projects
(date,
time,
name,
text1Text,
text1X,
text1Y,
text1Font,
pickMaterial,
shape,
pickThickness,
pickQty ,
backgroundColour,
text1Background,
xtraImg".$e."Name,
xtraImg".$e."X,
xtraImg".$e."Y,
xtraImg".$e."Width,
xtraImg".$e."Height,
xtraImg".$e."Alpha,
xtraImg".$e."Rotation,
xtraImg".$e."originalWidth,
xtraImg".$e."originalHeight,
xtraImg".$e."originalX,
xtraImg".$e."originalY,
xtraImg".$e."originalAlpha,
xtraImg".$e."originalRotation) VALUES
('$scoredate',
'$scoretime',
'$_POST[projectName]',
'$_POST[text1Text]',
'$_POST[text1X]',
'$_POST[text1Y]',
'$_POST[text1Font]',
'$_POST[pickMaterial]',
'$_POST[shape]',
'$_POST[pickThickness]',
'$_POST[pickQty]',
'$_POST[backgroundColour]',
'$_POST[text1Background]',
'$_POST[xtraImg1Name]',
'$_POST[xtraImg1X]',
'$_POST[xtraImg1Y]',
'$_POST[xtraImg1Width]',
'$_POST[xtraImg1Height]',
'$_POST[xtraImg1Alpha]',
'$_POST[xtraImg1Rotation]',
'$_POST[xtraImg1originalWidth]',
'$_POST[xtraImg1originalHeight]',
'$_POST[xtraImg1originalX]',
'$_POST[xtraImg1originalY]',
'$_POST[xtraImg1originalAlpha]',
'$_POST[xtraImg1originalRotation]')" ;