Hi
I am designing a database for a local garage which sales and repair cars, I have come up with attached ERD diagram could anyone give me any advice on it and let me know if there is something wrong with it.
Thanks for your help.
Kind Regards
HB 25
Hi
Thank you, I have managed to sort this problem but I do have another page where user could delete their booking with us, my questions is what will be the if statement before the MySQL delete statement to check the bookingID which user provided is exist in the table bookings if not exist then...
Hi
I am using the code below to validate user when they login to my website, the first part check if user have typed their username and the second part search the table to check user exist. These two parts work fine but the last part the while condition don’t work it keep give me the error...
Hi
I explain what I have, user will visi the site to change booking detail using their client and booking ID, once thy typed their client ID they will be directed to another page where they will be welcomed and they will be presented with a form to enter the booking ID they need to change and...
hi
this what i have used :
$startdate=mysql_real_escape_string(preg_replace('/(\d{2})-(\d{2})-(\d{4})/','$3-$2-$1',$_POST[startdate]));
$enddate=mysql_real_escape_string(preg_replace('/(\d{2})-(\d{2})-(\d{4})/','$3-$2-$1',$_POST[enddate]));
$adults=mysql_real_escape_string($_POST[adults])...
Hi
This is the outcome, and still prints date in this format 0000-00-00.
Arrival 2009-04-21
Departure 2009-05-22
________________________________________
Array
(
[firstname] => Alan
[surname] => smith
[address1] => hhhhhhhhhhhh
[address2] => hhhh
[town] => hh...
Hi feherke
Blow is what was between the horizontal line, but the dates in the table printed is (0000-00-00.
Array
(
[firstname] => Alan
[surname] => smith
[address1] => 75 Paltan Road
[address2] => didsbury
[town] => Manchester
[postcode] => M20 1JK
[telephone] =>...
Hi feherke
I have typed the mentioned code and below is the outcome, I think you write it does have a problem with $_POST data.
Any idea how we could fix this?
Regards
HB25
Array ( [firstname] => Alan [surname] => smith [address1] => 75 Paltan
Road [address2] => didsbury [town] => Manchester...
Hi
Sorry y feherke I am new to PHP and Mysql, could you please apply it to my code and post the code here again.
Thanks ever so much for your kind help.
Hi
This is my code :
<?php
// open database connection code and then my code as follows
$sql="INSERT INTO clients (firstname, surname, address1, address2,
town, postcode, telephone, email, cardno, expirydate) VALUES
('$_POST[firstname]','$_POST[surname]','$_POST[address1]'...
Hi
1. how is your $_POST data look like ?
02/04/2009 my mistake i have used (/) insted of (-), after change the date to 02-04-2009 it will jsut show the date as 2009-04-02
2. An extra closing bracket ( ] ) :
Again after deleting the extra bracket, i do get the same error message:
Error: Column...
Hi
The first code is just show (0000-00-00) in the start and end date field, and the second code it say
Error: Column 'startdate' cannot be null
Any more advice?
Thanks
HB25
Hi
The code below is the query which I am using, could you please let me know how I could embed the code you are mention above to this query?
$sql="INSERT INTO bookings (clientID, roomID, startdate, enddate, adults, children, roomtype, requirements) VALUES...
Hi feherke
This did work; I just wanted to say a big thank you for solving my thread.
My last problem is at the moment user will have to type date in this format (YYYY-MM-DD) as my phpMyadmin will only store date in this format any idea how I could make it to store date in this format...
yes
I ma using this code on another page but it repet the table mor than 10 times any idea why is this:
<?php
// open database connection code and then my code as follows
$sql="UPDATE bookings SET startdate ='$_POST[startdate]',enddate='$_POST[enddate]',adults='$_POST[adults]'...
Sorry
this what i get
-----------------------------------------
First name | nothing here (I mean this is empty)
------------------------------------
last Nmae | nothing here (I mean this is empty)
------------------------------------
Arrival date|nothing here (I mean this is empty)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.