php query cut short

draititudge

New Member
I'm having a problem with the following code in php.\[code\]$query_1 = "$dates ='" . $status ."' WHERE Name='" .$members . "'";$query = "UPDATE attendance SET $query_1";echo $query_1;echo "<br>";echo $query;\[/code\]I'm fetching the variables from another page using a form with the post method. The variables arrive correctly and everything works great until the $query.Namely, it cuts it's value by 2 characters - the last character from the $members variable and the ' character.example:\[code\]'dates' => string '08_10_2012' (length=10)'status' => string 'Declined' (length=8)'members' => string '01234567890' (length=11)\[/code\]I get the following:\[code\]08_10_2012 ='Declined' WHERE Name='01234567890'UPDATE attendance SET 08_10_2012 ='Declined' WHERE Name='0123456789\[/code\]Any help would be appreciated.
 
Top