I’m basically trying to pass a GET value from the construct function to the insert_update function. I have stripped out a lot of the latter function. Also, if it’s worth to note, this page is an include page.
class Updates {
function __construct(){
$owner = $this->get = array_map('mysql_real_escape_string', $_GET);
$owner=$owner["member_id"];
echo $owner;
}
//Insert Update
public function Insert_Update()
{
$query = mysql_query("INSERT INTO `field` (foo) VALUES (N'$owner')") or die(mysql_error());
}
1 Answer