Find Jobs
Hire Freelancers

Check field content depending on other field entries

$30-250 USD

Завершено
Опублікований over 13 years ago

$30-250 USD

Оплачується при отриманні
I have already an online booking form. The Form works fine now and I would like to add on one more issue, but the code ignores what I want to check. I have 4 fields: "arrival", "departure", "no. of persons" and "comments" to check. Scenario 1: All field mentioned above are empty: Workes fine and message appears: "You have not provided any booking details". Scenario 2: If arrival (date_start) and departure (date_end) is entered, there should be at least an entry either in the field "comment", or in the field "pax". If not, there should be a message: "You have not provided sufficient booking details". INSTEAD: The form is sent, which should NOT be the case ! The code is currently: # all fields are empty : arrival, departure, pax and comments ==> error (works fine) if(empty($data_start) && empty($data_end) && empty($pax)&& empty($comment)){ exit("You have not specified any booking details"); exit; } #If arrival and departure date is entered, there should be at least an entry either in the field "comment", or in the field "pax". if(!isset($data_start) && !isset($data_end) && empty($pax) && empty($comment)){ exit("You have not provided sufficient booking details."); exit; } The form is attached and can be tested at [login to view URL] Can someone please check and tell me what's wrong with the code ?
ID проекту: 819434

Про проект

11 пропозицій(-ї)
Дистанційний проект
Активність 14 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
I've taken a look and it's quite simple to fix the code to do what you want. Do you also want to modify the web-page code so that a message box comes up (similar to invalid email, name, or verification) stating that no booking information has been entered?
$30 USD за 1 день
5,0 (1 відгук)
1,0
1,0
11 фрілансерів(-и) готові виконати цю роботу у середньому за $31 USD
Аватарка користувача
I've GOT A SOLUTION right now!
$30 USD за 0 день
4,9 (133 відгуки(-ів))
6,5
6,5
Аватарка користувача
hi, expert, can do this fast
$30 USD за 1 день
5,0 (40 відгуки(-ів))
6,0
6,0
Аватарка користувача
Please check your PM
$40 USD за 1 день
5,0 (32 відгуки(-ів))
5,6
5,6
Аватарка користувача
I can fix this right now.
$30 USD за 0 день
4,9 (55 відгуки(-ів))
5,6
5,6
Аватарка користувача
Please check the PM.
$30 USD за 0 день
5,0 (4 відгуки(-ів))
3,1
3,1
Аватарка користувача
I can do it in 30 minutes
$30 USD за 1 день
5,0 (2 відгуки(-ів))
2,6
2,6
Аватарка користувача
Ready to complete this job. Can start ASAP. regards
$30 USD за 1 день
4,4 (3 відгуки(-ів))
2,2
2,2
Аватарка користувача
Please see PM!
$30 USD за 0 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Please check PM
$30 USD за 0 день
0,0 (0 відгуки(-ів))
0,0
0,0
Аватарка користувача
Would be glad to give you the fix.
$30 USD за 1 день
0,0 (0 відгуки(-ів))
0,0
0,0

Про клієнта

Прапор THAILAND
Phuket, Thailand
5,0
3
На сайті з жовт. 5, 2010

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.