Jump to content

spangle1187

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

spangle1187's Achievements

Member

Member (2/5)

0

Reputation

  1. Still comes back the same on the print_r
  2. I have removed the blank deceleration from the process login page but the print_r is still printing the same data: Array ( [username] => admin [email] => s.campbell@hud.ac.uk [ourdate] => 06/24/2011 [booking] => ) I guess the problem then lies with when I am trying to assign the $data variable to it so maybe on these two lines: $data = "You have successfuly made a booking for '$name' in room '$room' on the '$newDate' for the following times '$start_Time' to '$end_Time'"; or $_SESSION['booking'] = $data;
  3. No I give it the value then try to call it on the next page with: <?php echo $_SESSION['booking'];?>
  4. Sorry it did print out some data Array ( [username] => admin => s.campbell@hud.ac.uk [ourdate] => 06/24/2011 [booking] => )
  5. In my project once I have processed a booking I am trying to get a summary of the booking to display on the successful booking page, so far I have added an extra $_SESSION data to the page that processes the users login: session_start(); $_SESSION['username'] = $username; $_SESSION['email'] = mysql_result($result, 0); $_SESSION['ourdate'] = date('m/d/Y'); $_SESSION['booking']; The bottom line is for the booking summary. On the process booking page I have added: $data = "You have successfully made a booking for '$name' in room '$room' on the '$newDate' for the following times '$start_Time' to '$end_Time'"; It is here that I try to assign the above to the $_SESSION: $_SESSION['booking'] = $data; And then the site is directed to the booking success page: header("Location: http://webdev/schools/hhs/psy_bookings/process_booking_success.php"); //booking success page But when I get to the booking success page nothing is displayed, this is the code that I have used to display the booing summary: <div id="wholepage"> <?php echo $_SESSION['booking'];?> </div> Can you please help?, the data is not in a form so that is why I have not used the $_POST option
  6. Hi, I have two drop down lists both populated with times starting from 8.15 through to 18:15. What I would like to do is have the second list always in front of the first for example the time slots are 15 mins so, if the first list is at 8:15 the second should be at 8:30 and if the user changes the first list to 13:00 the second list will change to 13:15, can you please help me achieve this?
  7. I have amended the sql so that it now checks for the date as part of the query but how can I check to see if it brings back an empty result?
  8. Just been looking at my code and how would that work as if the time matches then the user will have to make another booking enquiry. if I pull that as part of my query will it not just pull a blank query rather then throwing an error?
  9. I had not thought of it that way round
  10. Sorry I mean times, I am wanting to look through the query to see if the time matches any held in the database not dates!
  11. I am trying to loop through the array that I have created to check to see if any of the dates in the array match the date I am passing (which is todays date) and then asks the user to consider making another booking. This is what I have so far but I am not sure how to finish it off: $table_id = 'booking'; $query = "SELECT * FROM booking WHERE bookingDate = 'newDate'"; $result = mysql_query($query); $loop = $end_Time - $start_Time; echo $loop; while($row = mysql_fetch_assoc($result)){ if ($startTime || $end_Time == 'booking.startTime'){ echo "choose another booking"; }{ echo "booking is ok"; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.