+ 1
Php problem help me plss
I am currently making a hotel system and it has check in date and check out date so I used <input type="date"> this is my form <form> Check in date:<input type="date" name="checkin"> Check out date:<input type="date" name="checkout"> </form> assuming the price per day is 1000 so if her check in date is march 20 and check out date is march 23 that would be 3 days. So what I want to happen is multiply the price by day she spent in the hotel base on what she inputs. Can someone help me ?
8 Respostas
+ 1
//Days stayed in hotel = x
x = check_out_date - check_in_date
total_cost = x * 1000
//is it what you are looking for?
+ 1
no its just a logic to implement it.
+ 1
yes, x is a variable
+ 1
no. idk. but you should try it yourself. 😉
0
yes like that . Is that the correct code? I'll try it
0
is that "x" a variable ?
0
ah . do you know the code ?
0
huhuhu I thought you know . I was hoping 😭