User Profile

Collapse

Profile Sidebar

Collapse
digituf
digituf
Last Activity: Apr 17 '10, 03:48 PM
Joined: Mar 14 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • digituf
    started a topic How to change the field status automatically?

    How to change the field status automatically?

    Hi everybody. right now i'm doing a hotel reservation system using php and phpmyadmin. The process involved

    1) user inputs check-in and check-out dates (to check what rooms are available during the dates input)
    2) database is queried for all room categories AVAILABLE within the dates indicated

    step 1 and 2 work out well using the query below :
    Code:
     (
    SELECT rt.roomtypeID, rt.roomtype, rt.roomprice
    ...
    See more | Go to post

  • digituf
    replied to room availability not functioning
    actually i already solved the problems..howev er thanks for the tips..:)
    See more | Go to post

    Leave a comment:


  • Thanks Mayur2007. your comment did really help me. I already solved the problems..thank z for spending time to check my code..:)
    See more | Go to post

    Leave a comment:


  • digituf
    started a topic How to get random number based on the condition.

    How to get random number based on the condition.

    i have two table in my database which is the room table and roomtype table.i'm using phpmyadmin.

    room table
    room_no
    r_roomtypeID

    roomtype table
    roomtypeID
    roomtype

    how can i create a query that can select A random room_no from "room table "
    based on the roomtypeID in the "table roomtype"

    p/s - each roomtypeID got it's own quantity room...
    See more | Go to post

  • digituf
    started a topic No data inserted into database. Am I wrongdoing it?
    in PHP

    No data inserted into database. Am I wrongdoing it?

    I have a form named:"Registra tionForm.php". when i click the "submit button", there's a data inserted in the database (the prove is, there a new row in the database),
    but there's no value from user textfield(ic_no ,name,email...) that have been inserted.
    It means like there's a row of data inserted but without value..

    p/s- however, when i click the submit button, it successfully directed me to the...
    See more | Go to post

  • digituf
    replied to composite key syntax. How can I fix this?
    hi atli. can you please explain further this syntax to declare composite key :

    Code:
    PRIMARY KEY ( col1, col2, col3, ..., colN)
    it seems that the primary key that i wanted to define as composite key is declare in one row 'PRIMARY KEY (col1, col2, col3)', so how can i know that which primary key that supossed to refer to the table that i wanted..

    Code:
    CREATE TABLE booking(
    bookingID
    ...
    See more | Go to post

    Leave a comment:


  • digituf
    started a topic composite key syntax. How can I fix this?

    composite key syntax. How can I fix this?

    i wanted to create a table name booking that have 3 composite key where 2
    of the composite key is referring to each another table named customer and room.

    however when i wanted to create the table, it give me error. can someone tell me
    how can i fix this.

    Here's the command :
    Code:
    CREATE TABLE booking(
    bookingID INT NOT NULL AUTO_INCREMENT ,
    checkin DATETIME,
    checkout DATETIME,
    ...
    See more | Go to post

  • digituf
    started a topic room availability not functioning

    room availability not functioning

    i have just create 4 tables like below :

    Code:
    CREATE TABLE customer(
    customerID INT NOT NULL AUTO_INCREMENT ,
    name VARCHAR( 30 ) ,
    address VARCHAR( 30 ) ,
    tel_no INT( 15 ) ,
    email VARCHAR( 30 ) ,
    PRIMARY KEY (customerID)
    ) ENGINE=INNODB;
    
    
     CREATE TABLE roomtype(
    roomtypeID INT NOT NULL AUTO_INCREMENT ,
    roomtype VARCHAR( 30 ) ,
    roomprice INT( 30 )
    ...
    See more | Go to post
    Last edited by Atli; Mar 24 '10, 12:33 AM. Reason: Added [code] tags.

  • can i insert value from another page into next page query

    i have 2 forms here.
    1) DisplayDetails. php
    2) RegistrationFor m.php

    when user click to the link 'Next' at the DisplayDetails. php page it will bring
    all the session value to the RegistrationFor m.php page. But, there's also value which is not session which is
    i) $room_type

    so, at the RegistrationFor m, i wanted to passed all the values from the DisplayDetails. php into mysql query
    to...
    See more | Go to post

  • digituf
    replied to Passing variables to pages via Sessions
    in PHP
    Yeah..i finally realize that the prob comes from the wrongly flow of my code.I'm really make myself like fool where i look back at my code. There's eally no logic there. However, i alreaddy fix it..

    Since i'm newbie(well...e verybody said so..:)), i just thinks the way to pass data without even thinking any logic in the system. I finally sets id at the url at the that will redirect to the DisplayDetails. php page where by setting it...
    See more | Go to post

    Leave a comment:


  • digituf
    replied to Passing variables to pages via Sessions
    in PHP
    i try to trace the output based on the session using this cod :
    Code:
    echo "<pre>";
    var_dump($_SESSION);
    echo "</pre>";
    it produce that this kind of result:
    Code:
    array(8) {
      ["checkin"]=>
      string(12) " 	2010-03-01"
      ["checkout"]=>
      string(12) " 	2010-03-24"
    ...
    See more | Go to post

    Leave a comment:


  • digituf
    started a topic Passing variables to pages via Sessions
    in PHP

    Passing variables to pages via Sessions

    i have page findroom.php that will redirect to the page DisplayDetails. php.

    i wanted the DisplayDetails. php page to display data from the query in the page findroom.php. The data that i wanted to display from the query from page DisplayDetails is 'room_price' and 'room_type'.

    However, when i clik the Book Now link, it dosesnt't display the value.

    Since i'm just a starter in php, can someone tell me am...
    See more | Go to post

  • digituf
    replied to how to assign textbox value as php variables?
    in PHP
    finally i know that i need to use javascript to solve this matter as i don't need to execute it at server
    See more | Go to post

    Leave a comment:


  • The php form redirect to the next page when click at the javascript calendar

    can someone help me by telling me why is that whenever i click the javascript calendar, it redirect me to another page eventhough i still do not finish fill the form?

    here is the code:

    Code:
    <?php
    session_start();
    
    $_SESSION['checkin']=$checkin;
    $_SESSION['checkout']=$checkout;
    $_SESSION['rooms']=$rooms;
    $_SESSION['adults']=$adults;
    $_SESSION['children']=$children;
    ...
    See more | Go to post

  • digituf
    started a topic how to assign textbox value as php variables?
    in PHP

    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:
    
    
    ...
    See more | Go to post

  • thanks marcus for the reply..
    but still, i have some difficulties here.
    How can i make when i click the submit button, it will go to the page 'DisplayDetails .php' where on the page it will only display the row where i have insert value in the textfield?

    here's the current code.
    Code:
    <html>
    <body>
    <form action="DisplayDetails.php" method="post">
    ...
    See more | Go to post

    Leave a comment:


  • digituf
    started a topic how to combine textfield with counter variables?
    in PHP

    how to combine textfield with counter variables?

    Code:
    <html>
    <body>
    <p>
      <?php
    $result = mysql_query("SELECT distinct room_type,room_price from room1 WHERE room_no NOT IN ( SELECT id_room_no
    FROM reservation1 WHERE datein >='$datein' AND dateout <='$dateout')");
    
    ?>
    </p>
    <p><strong><strong>Room Availbility</strong></p>
    <p>&nbsp; </p>
    ...
    See more | Go to post
No activity results to display
Show More
Working...