Re: Strange problem...

From: Date: Sat, 01 Dec 2001 23:34:27 +0000
Subject: Re: Strange problem...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76330@lists.php.net to get a copy of this message
Hola Daniel: Te escribo en castellano ya que veo que el inglés no es tu idioma natural. Creo que el error se produce al concatenar las variables, acordate que para indicar que las variables con cadenas tenés que encerrarlas entre "", yo lo definiría así: $user_birthdate = "$birth_year-$birth_month-$birth_day"; // 1982-12-08 Saludos Edgardo "Daniel alsén" <d@mindbash.com> escribió en el mensaje news:PGEGIELINOCCEHLENIOJMEAOCDAA.d@mindbash.com... > Hi, > > i have a strange problem. > > I get a users birthdate with three dropdown menus (year, month and day of > month). I get these values into one string with: > > $user_birthdate = $birth_year . $birth_month . $birth_day; > > If i echo $user_birthdate after this it is correct (yyyymmdd). But when i > insert the value of $user_birthdate into MySql it gets the value '8388607'. > It doesn´t matter what value $user_birthdate had originally - it always > inserts as 8388607. > > Any ideas??? > > > > The db question looks like this btw: > > $query = "INSERT INTO users "; > > $query .= "(user_name, user_birthdate, user_city, user_mail, user_icq, > user_msn, user_www, user_login, user_password) "; > > $query .= " values('$user_name', '$user_birthdate', > '$user_city', > '$user_mail', '$user_icq', '$user_msn', '$user_www', > '$user_login', > '$user_password')"; > > > Regards > # Daniel Alsén | www.mindbash.com # > # d@mindbash.com | +46 704 86 14 92 # > # ICQ: 63006462 | +46 8 694 82 22 # > # PGP: http://www.mindbash.com/pgp/ # >

« previous php.general (#76330) next »