RE: [PHP] Going crazy again ...

From: Date: Tue, 01 May 2001 19:19:13 +0000
Subject: RE: [PHP] Going crazy again ...
Groups: php.general 
Request: Send a blank email to php-general+get-50993@lists.php.net to get a copy of this message
I was actually interested in the answer to this. I believe one can write in English if one can read English. (PS: It's not my first language either) oktay -----Original Message----- From: Jimmy Lantz [mailto:jimmy.lantz@ostas.lu.se] Sent: Tuesday, May 01, 2001 3:14 PM To: php-general@lists.php.net Subject: Re: [PHP] Going crazy again ... 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#50993) next »