I am running this code on version 4.3.4
This code takes a range of years e.g. 1980-85 and inserts into the database 80,81,82,83,84,85
$yr=explode("-", $years);
if($yr)
{
$left=substr($yr[0],-2);
$right=substr($yr[1],-2);
$var=range("$left","$right"
;
for($i=0; $i < $right; $i++)
$years=implode(",", $var);
}//end if
$query="INSERT INTO midway(div, rate, name, years, email, photo, notes, pass, id)
VALUES (trim('$div'), trim('$rate'), trim('$name'), trim('$years'), trim('$email'), trim('$photo'),trim('$notes'), trim('$pass'), '$id' )";
I then use the variable $years in a database.
The code works perfect on version 4.3.4 but when I run it on version 4.2.1 it does not work
I only get a singe digit. In this case it would just be an 8
Does anybody know why??
Thanks
This code takes a range of years e.g. 1980-85 and inserts into the database 80,81,82,83,84,85
$yr=explode("-", $years);
if($yr)
{
$left=substr($yr[0],-2);
$right=substr($yr[1],-2);
$var=range("$left","$right"

for($i=0; $i < $right; $i++)
$years=implode(",", $var);
}//end if
$query="INSERT INTO midway(div, rate, name, years, email, photo, notes, pass, id)
VALUES (trim('$div'), trim('$rate'), trim('$name'), trim('$years'), trim('$email'), trim('$photo'),trim('$notes'), trim('$pass'), '$id' )";
I then use the variable $years in a database.
The code works perfect on version 4.3.4 but when I run it on version 4.2.1 it does not work
I only get a singe digit. In this case it would just be an 8
Does anybody know why??
Thanks