Ahojky - píše to chybu resource id #2 - co dělám špatně?
<?php
$spass = $_POST["spec_pass"] ;
session_start();
$spass_ses = $_SESSION["sheslo"];
$om = $_SESSION["om"]; // old mail
$nm = $_SESSION["nm"]; // new mail
echo $
$con = mysql_connect("localhost", "****", "******");
mysql_select_db(elogin);
$return = mysql_query("SELECT * FROM `elogin` WHERE email = '".mysql_real_escape_string($om)."'");
$zaznam = mysql_fetch_array($return) or die ("nefunguje ".mysql_error());
$mail = $zaznam["email"];
if ($spass != $spass_ses )
{
echo "chyba 1";
break 1;
}
elseif ($om == $mail)
{
$a = mysql_query ($con, "UPDATE elogin SET ".$nm." WHERE email =".$zaznam["email"]);
echo 'email uspesne zmenen';
}
else
{
echo "chyba 2";
break 2;
}
if(!$a)
echo "chyba".mysql_error();
else
echo 'vse ok';
?>