View Single Post
  #2 (permalink)  
Old April 29th, 2004, 02:05 PM
skicrud skicrud is offline
Authorized User
Join Date: Sep 2003
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts

found a solution

include ("header.php");
        if ((ereg("[^1]$",$lvar)) && (ereg("[^\d\w]$",$lvalue))){ //if var does not end in a 1 and

                                        //value not null
        //echo "$lvar=$lvalue<br>"; //echo the var and its value
        //echo "$lvar ";
        //echo "$statement<br>";
        $name=$name . $lvar . ","; //built var string
        $value=$value . $lvalue . "','";
        //echo "$lvalue ";
$length=strlen($name); //get length of string
$name="($name)"; //strip out last comma
echo "$name<br>";
echo "$value<br>";
$sql="INSERT into msdsmasterlist $name VALUES $value ";
echo $sql;
echo $num_rows;
echo $errors;