Hej, jag hade nog inte använt åäö i case men det är bara en vana, kanske du kan 
använda en dold
variabel via html-formuläret istället och använda den i case satsen?
Men det svarar ju inte på din fråga men lycka till.
/ iImmy
Martin Skjöldebrand wrote:

> Going grey haired again. In this code only the first case is working
> (adding stuff to tables). The second and third are producing - Warning:
> Supplied argument is not a valid MySQL-Link resource in
> /chroot/htdocs/diarium/settings.php on line 31 (which is $query_res ..../ms)
> error:
>
> I've even copied and pasted the also clause which works from sendaction to
> recaction but I get the same result. Anyone sees what going on? I don't.
> And my deadline is tomorrow (or thursday).
>
> M.
>
> switch ($sendaction) {
>                 case "Lägg till":
>
>                         $query="INSERT INTO employees (login, name)";
>                         $query .= "VALUES('$txtSend', '')";
>                         $query_res =mysql_query($query, $mysql_link) or die('error: 
>' .
> mysql_error());
>                         if ($also=="Rec"){
>                                 $query="INSERT INTO contacts (id, name)";
>                                 $query .= "VALUES('$txtSend', '')";
>                                 $query_res =mysql_query($query, $mysql_link) or 
>die('error: ' .
> mysql_error());
>                         }
>                         break;
>                         }
>
>         switch ($recaction) {
>                 case "Lägg till":
>                         $query="INSERT INTO contacts (id, name)";
>                         $query .= "VALUES('$txtRec', '')";
>                         $query_res =mysql_query($query, $mysql_link) or die('error: 
>' .
> mysql_error());
>                         break;
>                         }
>
>         switch ($archaction) {
>                 case "Lägg till":
>                 $query="INSERT INTO archive (s_name, name) VALUES('$txtArch', '')";
>                         $query_res =mysql_query($query, $mysql_link) or die('error: 
>' .
> mysql_error());
>
>
>                         break;
>                         }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to