Hi
I am trying to insert data with variable variables but following happens. For instance I have for loop
for ($i = 1 ; $i <= $j ; $i++)
{
$vdate = "date$i";
$vdealer = "dealer$i";
global $$vdate;
global $$vdealer;
$query=" INSERT INTO voice (ent,date,dealer) VALUES
(0,'$$vdate','$$vdealer') " ;
if ($result = mysql_query($query)) {
echo "<p><b><i><h3> Data Is Loaded Succesfully </h3></b></i><br>" ;}
else { echo mysql_errno(), mysql_error(); }
}
This code inserts $date1, $date2...to date column and same for the dealer also but it should read the values entered at predecessor page. But when I
echo $$vdate;
it reads the original value that I entered at first page.
What can I do to enter values to database ?
Thank you very much.
erkan.