Insert variabel sendt fra Flash via PHP service, hvor er fejlen?
PHP: Modtager object $rs fra Flash.<?php
class test{
var $dbhost = "localhost";
var $dbname = "*";
var $dbuser = "*";
var $dbpass = "p*";
function test(){
$this->methodTable = array(
"setItems" => array(
"description" => "Insert i MySql",
"access" => "remote", // available values are private, public, remote
"arguments" => array ("rs")
)
);
// Initialize db connection
$this->conn = mysql_pconnect($this->dbhost, $this->dbuser, $this->dbpass);
mysql_select_db ($this->dbname);
}
function setItems($rs){
$sql = "INSERT INTO test (var) VALUES ('".$rs['vari']."'";
mysql_query($sql);
}
}
?>
Er der fejl i $sql?
