I have a little problem with my script. When I try to run it I receive "Parse error: syntax error, unexpected T_STRING" as long as I have ' sign in my code. When I change all ' into " then I have the same error. So I have to change all " into '. How can I solve it?
Here is my code:
<?php
PutEnv(TNS_ADMIN='C:\Programy\OracleDeveloper10g\NETWORK\ADMIN\');
$conn = oci_connect("user", "pass", "dbstring");
if (!$conn)
{
$e = oci_error();
print $e;
exit;
}
else
{
$stmt = OCIParse($conn, "SELECT password FROM USERS WHERE username=szymon");
OCIExecute($stmt, OCI_DEFAULT);
while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
foreach ($row as $item) {
$password = $item;
}
if ($password != $_POST[password]){
$stmt = OCIParse($conn, "EXECUTE drop_tables");
$message = "Tabele zostały usunięte";
}
else {
$message = "Podane hasło jest niepoprawne";
}
}
}
?>