Hopefully that title doesn't put everyone off...
I want to create an SQL string such as...
Code:
$sql = "INSERT INTO client_table (ps_name) VALUES ('$input["ps_name"]')";
...which is then fed to the mysql_query(), but because the value of ps_name is coming from an associative array I'm getting a parsing error
Quote:
|
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
|
I also tried using ' quotes around the ['ps_name'] bit but that didn't work either and I tried escaping the ' within the brackets, but again failure.
I don't suppose anyone knows of a way around this? I could just drop the data out into temp variables, but I'm sure when they designed PHP4 they probably thought of this?
Cheers
Trev