I have a project that I’m working on and having trouble fixing it. So i have a dog walking website and i have a database called ‘Dogsmart’ in that database are three tables one for users login, the other for ‘services’ and the main one for ‘bookings’.
So far i have a login working only for the users with a session and somewhat for admin but need to add a session for admin. I have manage to get the a table to be viewed on the bookings page but having trouble getting add booking and edit booking working
wanted to know if you could help me.
Thanks
–new_booking.php
[php]
New BookingNew Bookings
<?php // connect to the database include('connect.php'); if(isset($_POST['submit'])) { $name=mysql_real_escape_string($_POST['name']); $service=mysql_real_escape_string($_POST['service']); $date=mysql_real_escape_string($_POST['date']); $time=mysql_real_escape_string($_POST['time']); $query1=mysql_query("INSERT INTO bookings values(users.username, services.service,'$date','$time')"); //echo "insert into bookings values('','$name','$service','$date','$time')"; if($query1) { header("location:booking_view.php"); } } $query = mysqli_query("SELECT username FROM users"); ?>Name: *
Service: *
Date: *
Time: *
* required
—edit_booking.php
[php]
Edit Bookings
<?php /*if ($error != '') { echo "ID: <?php echo $id_bookings; ?>
<?php } ?>Service: *
Date: *
Time: *
* Required
[/php]
Thanks