bezierstek
Programmer
Hi,
I need to enter some data into a mysql database, but one of the fields uses a variable which is dynamically created by php.
when I execute the script it gives me a error. I have echoed the sql and it gives me
Obviously I want it to use the value of the variable $caption1 rather than the variable name.
the code that creates the dynamic variable name is:
Cana nyone help me on this one?
Thanks
I need to enter some data into a mysql database, but one of the fields uses a variable which is dynamically created by php.
when I execute the script it gives me a error. I have echoed the sql and it gives me
Code:
insert into photos (pid, photo, photoalt) values('9', V9_1.jpg', '$caption1')
Obviously I want it to use the value of the variable $caption1 rather than the variable name.
the code that creates the dynamic variable name is:
Code:
$picturenumber="picture" . $piccounter;
$picturealt="caption".$piccounter;
$imagesql="insert into photos (pid, photo, photoalt) values('$propertypid', $newfilename', '$$picturealt') ";
Cana nyone help me on this one?
Thanks