Jump to content

Recommended Posts

Posted

Hi every body

i have problem to save datepicker jquery to php form and after it save in databse,

 

it's code of datepicker

 

<script type="text/javascript">

$(function() {

 

$('#datepicker0').datepicker();

 

});

-----------------

it's my form

<form method ="post" action = "dateprocess.php">

 

<input type="text" id="datepicker" />

<input type="button" name="button" id="button" value="check" onclick="javascript:alert(this.form.datepicker0.value);"/>

 

-----------------------------------------------

I can see my datepicker resault in my message but i dont know how send it to php variable or data base

Posted

You could do something like this and incorporate JS in PHP to save it as a php variable. Then you will have to learn setting up a database and adding it to it by yourself. Their is some good tutorials on it.

 

<script>
<?php
   $datepicker = this.form.datepicker0.value;
?>
</script

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...