473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to assign textbox value as php variables?

17
may i know if in php i can assign the textbox value from the user input as variables and then display the result of in the same page.

assume, user insert the checkin and checkout date, then it wil automatically show the numbers of the day the user will stay at the hotel.

any suggestion will really appreciates because i have no ideas what should i do ...

below is the code

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-cold-1" />
  6. <script type="text/javascript" src="Kalendar/calendar.js"></script>
  7. <script type="text/javascript" src="Kalendar/calendar-en.js"></script>
  8. <script type="text/javascript" src="Kalendar/calendar-setup.js"></script>
  9. <script type="text/javascript" src="Kalendar/ew.js"></script>
  10. <script type="text/javascript"></script>
  11. <title>SistemAPOS</title>
  12. <style type="text/css">
  13. <!--
  14. .style7 {color: #FFFFFF}
  15. .style8 {
  16.     color: #000000;
  17.     font-weight: bold;
  18. }
  19. .style10 {color: #FFFFFF; font-weight: bold; }
  20. .style11 {font-weight: bold}
  21. -->
  22. </style>
  23.  
  24. </head>
  25.  
  26. <body>
  27.  
  28. <form action="findroom.php" method="post">
  29.  
  30.   <p>Check Room Availbility</p>
  31.   <p>Date In
  32.     <label>
  33.       <input type="text" name="datein" id="datein" />
  34.       <input name="datein" type="image" id="dateA" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
  35.   <script type="text/javascript">
  36.                     </script>
  37.             </strong>
  38.   <script type="text/javascript">Calendar.setup(
  39.                     {
  40.                         inputField : "datein", // ID of the input field
  41.                         ifFormat : "%Y-%m-%d", // the date format
  42.                         button : "dateA" // ID of the button
  43.                     }
  44.                     );
  45.                     document.write(ifFormat);
  46.                     </script>
  47.     </label>
  48.   </p>
  49.   <p>Date Out
  50.     <input type="text" name="dateout2" id="dateout" />
  51.     <input name="dateout" type="image" id="dateB" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
  52.     </strong>
  53.     <script type="text/javascript">Calendar.setup(
  54.                     {
  55.                         inputField : "dateout", // ID of the input field
  56.                         ifFormat : "%Y-%m-%d", // the date format
  57.                         button : "dateB" // ID of the button
  58.                     }
  59.                     );
  60.                     document.write(ifFormat);
  61.                     </script>
  62.   </p>
  63.   <p>Number of Days : Supposely this is the place where it will display how many days the user will stay</p>
  64.   <p>
  65.     <label>
  66.       <input type="submit" name="Check" id="Check" value="Submit" />
  67.     </label>
  68.   </p>
  69. </form>
  70. </body>
  71. </html>
  72.  
  73.  
  74.  
Mar 18 '10 #1
2 6199
Magnie
3
Is there any way you could explain what you want in more depth?
Mar 18 '10 #2
digituf
17
finally i know that i need to use javascript to solve this matter as i don't need to execute it at server
Mar 20 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Eric | last post by:
How can I dynamically assign an event to an element? I have tried : (myelement is a text input) document.getElementById('myelement').onKeyUp = "myfnc(param1,param2,param3)"; ...
2
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New...
2
by: gjtired | last post by:
Currently I am retrieving values from a dataset and assigning the values to a textbox. I then assign the value from the textbox to a variable. I don't need the values in the textbox at all. I'm...
2
by: Grey | last post by:
I want to assign a value to HMTL textbox with id "txtABC" in ASP.NET with C#
1
by: Shilpi Chaudhry | last post by:
I have a forloop which I use to create textboxes - but unfortunately all of them have the same ids - I need to assign different ids to these textboxes creeated in the loop so that I can retrieve...
8
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
15
by: Swetha | last post by:
Hello I have a DropDownList that I am populating using the following SqlDataSource: <asp:DropDownList ID="parentIDDropDownList" runat="server" DataSourceID="SqlDataSource3"...
6
by: david | last post by:
I try to use "for" loop to retrieve and assign values in web form. The code is in the following. But it can not be compiled. What I want to do is: txtQ1.Text =...
5
by: lianping | last post by:
Hi, I have a problem to assign a value into text box, below will be my script. Before view my script, let me hv quick explain on what is my problem: I would like to assign Java script value...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.