You are here: Re: date_of_birth function (a new question) « All PHP « IT news, forums, messages
Re: date_of_birth function (a new question)

Posted by linda on 11/17/06 18:07

"J.O. Aho" <user@example.net> wrote in message
news:4s6avfFud674U1@mid.individual.net...
> linda wrote:
>> OK, sorry another question abouth the date_of_birth function that I have,
>> how can I now insert into user_database the year, moth & day as one
>> entry?
>>
>> At the moment this function produces drop downs, one for year one for
>> month and so on, named as year, month etc. How would I convert this into
>> date_of_birth to insert into a date field of that name in the
>> user_database?
>>
>> Any help would be gratefully received.
>>
>> Many thanks in advance.
>> Linda
>>
>>
>>
>
> You have to adjust this to how dates are used in your region/database
>
>
> //This will result in a date like: YYYY-MM-DD
> $bdate=$_REQUEST['year'] . '-' . $_REQUEST['moth'] .'-' .
> $_REQUEST['day'];
>
> //We create a simple insert line for the database
> $query="INSERT INTO table('name','birthday') VALUES('$name','$bdate')";
> //We execute the query
> $result=mysql_query($query);
>
>
> Don't forget to connect to the database first and then check for fails in
> the insert.
>
>
>
> //Aho

Hi Aho,

Thank you so much, I knew it was something like that, I was trying to do it
with _GET, and it wasn't working obviously.;-)

I'm very greatful of all the help I have been getting in this newsgroup,
thank you!

Best wishes,
Linda

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация