The value that gets selected by the datepicker will be put in as the value
of the form field, as if
<input type="text" id="datepicker" value="09/01/2009">

If you use a traditional form submit, this should arrive at your server in
the querystring if your form uses the GET method, as a post parameter if
your form uses the POST method. One thing that's missing is that your input
needs a name:

<input type="text" id="datepicker" name="date">

This helps your form communicate to the server which value you're talking
about, as forms typically have more than one control. For example, your form
might have a start date, and and end date:

<input type="text" class="date" name="startdate">
<input type="text" class="date" name="enddate">

By giving them both a class of 'date', you can make them both datepickers in
jQuery UI by

$('.date').datepicker();

Then when your server gets the data, it'll have two different dates, a start
date and an end date. In a querystring, that would look like this:

?startdate=09/01/2009&enddate=10/01/2009

How you get at those values is a back end (php) question. It's no longer
related to what jQuery UI has helped you with, which is on the front end
(javascript). Meaning the answer is not specific to the fact that you've
used a datepicker to help the user populate the value of the date textbox.

- Richard

On Mon, Aug 24, 2009 at 11:02 PM, ivanichi <[email protected]> wrote:

>
> i have problem insert the information of datepicker have view in
> textbox to mysql database
>
> this script on php for display datepicker:
>
> <script type="text/javascript">
>        $(function() {
>                $('#datepicker').datepicker({
>                        changeMonth: true,
>                        changeYear: true
>                });
>
> and then, this script beetween <body> </body>
>
> <form name="form1" method="post" action="sim.php">
> <td>date :</td>
> <td><div><input type="text" id="datepicker"></div></td>
>
> ok..i can view the datepicker effect on my form, its good. but i cant
> save it on mysql
> on sim.php action :
>
> after make the connection to the database...
> ....
> $SQL = "INSERT INTO siswa VALUES ('$datepicker');
> ....
> anybody help me how to save the information textbox after choice the
> date from textbox to mysql ? (sim.php) ?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to