how to assign textbox value as php variables?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • digituf
    New Member
    • Mar 2010
    • 17

    how to assign textbox value as php variables?

    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

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" type="text/css" media="all" href="calendar-win2k-1.css" title="win2k-cold-1" />
    <script type="text/javascript" src="Kalendar/calendar.js"></script>
    <script type="text/javascript" src="Kalendar/calendar-en.js"></script>
    <script type="text/javascript" src="Kalendar/calendar-setup.js"></script>
    <script type="text/javascript" src="Kalendar/ew.js"></script>
    <script type="text/javascript"></script>
    <title>SistemAPOS</title>
    <style type="text/css">
    <!--
    .style7 {color: #FFFFFF}
    .style8 {
    	color: #000000;
    	font-weight: bold;
    }
    .style10 {color: #FFFFFF; font-weight: bold; }
    .style11 {font-weight: bold}
    -->
    </style>
    
    </head>
    
    <body>
    
    <form action="findroom.php" method="post">
    
      <p>Check Room Availbility</p>
      <p>Date In
        <label>
          <input type="text" name="datein" id="datein" />
          <input name="datein" type="image" id="dateA" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
      <script type="text/javascript">
    					</script>
                </strong>
      <script type="text/javascript">Calendar.setup(
    					{
    						inputField : "datein", // ID of the input field
    						ifFormat : "%Y-%m-%d", // the date format
    						button : "dateA" // ID of the button
    					}
    					);
    					document.write(ifFormat);
    					</script>
        </label>
      </p>
      <p>Date Out
        <input type="text" name="dateout2" id="dateout" />
        <input name="dateout" type="image" id="dateB" src="Kalendar/ew_calendar.gif" width="16" height="15" border="0" />
        </strong>
        <script type="text/javascript">Calendar.setup(
    					{
    						inputField : "dateout", // ID of the input field
    						ifFormat : "%Y-%m-%d", // the date format
    						button : "dateB" // ID of the button
    					}
    					);
    					document.write(ifFormat);
    					</script>
      </p>
      <p>Number of Days : Supposely this is the place where it will display how many days the user will stay</p>
      <p>
        <label>
          <input type="submit" name="Check" id="Check" value="Submit" />
        </label>
      </p>
    </form>
    </body>
    </html>
  • Magnie
    New Member
    • Mar 2010
    • 3

    #2
    Is there any way you could explain what you want in more depth?

    Comment

    • digituf
      New Member
      • Mar 2010
      • 17

      #3
      finally i know that i need to use javascript to solve this matter as i don't need to execute it at server

      Comment

      Working...