My mysql statement is pretty simple.
$store = qq(INSERT INTO main (creator_name,relationship) VALUES("$
+data{creatorname}","$data{relationship}") );
This works perfectly as it is but I have need to loop over this three times to get all the form variables without actually hardcoding three mysql statements.
$store = qq(INSERT INTO main (creator_name,relationship,reason, em
+ail,name,creator_email,creator_url,victim_url,length_of_stay,release_
+date,ip,state) VALUES("$data{creatorname}","$data{relationship}") );
[/code]
What I'm trying to do is
[code]
for (my $i = 0; $i <=3; $i++)
{
$store = qq(INSERT INTO main (creator_name,relationship) VALUES("$
+data{creatorname}",$data{"relationship$i"}) );
And it errors with the generic "something is bad with your mysql query. Anyone know what I need to do to get $data{relationship$i} to work in this way?