RE: [PHP-WIN] Re: PHP & MySQL problems, updating database..

From: Date: Thu, 17 Jan 2002 18:58:07 +0000
Subject: RE: [PHP-WIN] Re: PHP & MySQL problems, updating database..
Groups: php.windows 
Request: Send a blank email to php-windows+get-11497@lists.php.net to get a copy of this message
or die ("Error Message"); --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Nullum magnum ingenium sine mixtura dementiae fuit > -----Original Message----- > From: Nicole Amashta [mailto:430ntr3k@bellsouth.net] > Sent: Thursday, January 17, 2002 2:00 PM > To: php-windows@lists.php.net > Subject: [PHP-WIN] Re: PHP & MySQL problems, updating database.. > > > You may want to add > exit; > where the failures occur to stop code "execution." > > > > if ( $link = mysql_connect($host,$user,$pswd) ) > > { > > if( !mysql_select_db($db, $link) ) > > { > > echo "error selecting db"; > exit; > > } > > } > > else { > > echo "error connecting to db"; > exi; > > } > > > > "Nicole Amashta" <430ntr3k@bellsouth.net> wrote in message > news:20020117184948.70528.qmail@pb1.pair.com... > > Please try this: > > > > if ( $link = mysql_connect($host,$user,$pswd) ) > > { > > if( !mysql_select_db($db, $link) ) > > { > > echo "error selecting db"; > > } > > } > > else { > > echo "error connecting to db"; > > } > > > > Nicole Amashta > > www.aeontrek.com > > > > "Hawk" <hwk@barrysworld.com> wrote in message > > news:20020117181851.39529.qmail@pb1.pair.com... > > > Having a problem with this, I have a working login that supports > multiple > > > users, and I'm trying to make it possible for the users > to change their > > own > > > settings etc, but I get killed when trying to send the > data to the MySQL > > > database. > > > To connect I use mysql_connect($host,$user,$pswd) and > mysql_select_db($db) > > > > > > the retrieving data from the form works since I belive, > since it showed > up > > > when I added a print "$the vars " but I don't know how to > save it to the > > > database.. > > > > > > I might be missing some line or maybe it's just because > I'm a newbie or > > > something.. ;D > > > anyway.. I use something similiar to this > > > $query = "UPDATE users SET email='$email'"; // and so on.. > > > $result = mysql_query($query) or die ("blabla"); > > > > > > I don't get any error lines or anything, the only thing > that shows is > the > > > "blabla" thing. > > > > > > I also tried INSERT INTO in the query but that didn't make any > difference > > :p > > > > > > if anyone could tell me what I'm doing wrong I would be happy.. :p > > > "the best way to learn is to ask people that know" :p > > > > > > Hawk > > > > > > > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#11497) next »