You guys have any idea what I have to change in order to grab the whole address?
I know the code below is very basic, but once it fully works, I'll look into preventing sql injections, etc.
Code: Select all
<?php
include_once("con_sql.php");
class Customer
{
var $dbhost = HOSTNAME;
var $dbname = DATABASE;
var $dbuser = USERNAME;
var $dbpass = PASSWORD;
function Customer()
{
$this->methodTable = array(
"insertCustomer" => array(
"description" => "Inserts a new client",
"access" => "remote", // available values are private, public, remote
"arguments" => array ("eml", "pwd", "fname", "lname", "address", "city", "state", "zip", "phone")
)
);
$this->conn = mysql_pconnect($this->dbhost, $this->dbuser, $this->dbpass);
mysql_select_db ($this->dbname);
}
function insertCustomer($eml, $pwd, $fname, $lname, $dob, $address, $city, $state, $zip, $phone)
{
//Insert query
$result = mysql_query("Insert into customers values('', '".$eml."', '".$pwd."', '".$fname."', '".$lname."', '".$dob."', '".$address."', '".$city."', '".state."', '".$zip."', '".$phone."')");
if($result) return mysql_insert_id($this->conn);
else return "error";
}
}
?>