472,364 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 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 6117
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.