|
0 / 0 / 0
Регистрация: 30.06.2020
Сообщений: 196
|
||||||
Задания PHP которые я не понимаю, тема get и post20.12.2022, 16:32. Показов 498. Ответов 1
Метки нет (Все метки)
For these exercises, open in a code editor the file get_post_parameters.php. Test all your code by giving different values as input in the forms. Pay close attention whether the form's method is "get" or "post" and what the name attributes of the fields are. Parameters passed in URL are always get type.
1. Add the code that prints one of the following sentences depending on the parameters in the URL: html: HTML defines the structure of a document. css: CSS defines the appearance of a document.. javascript: Javascript is a client-side language. php: PHP is a server-side language. If the parameter is set, but is none of the above, print "Technology not found!". Test your code by clicking on the links. 2. The user may give their first and last name in the form. Print the information. First name: (first name from form) Last name: (last name from form) This is the last exercise that already checks that the correct form is sent (if(isset($_POST["xxx"])). From now on, it's up to you. Each form's submit button has an unique name attribute. 3. The exercise contains the code for a registration form of a community site. It asks for the following information: name (text field) * e-mail (text field) * password (password field) * gender (radio button: male, female, other) country (dropdown) description (text area) Write a form handler that checks that all fields marked with * are filled. If this is the case, print the information as follows. If not, print an error message "Please fill all mandatory fields." Name: xxx E-mail: xxx Password: xxx Gender: xxx Country: xxx Description: xxx 4. Sometimes it's necessary to add information the user can't see to a form. For this we can use input type "hidden". E.g. <input type="hidden" name="productid"> Add a hidden field "join_year" to the form of the previous exercise. Put the value of the current year into it (either manually or with PHP). Also print this value in the form handler. 5. When considering software security, all user input should always be "cleaned up" for possibly harmful elements. For example, if your site allows comments and users can input their own Javascript code, this code may end up pushing malware to the computers of all your visitors. The easiest countermeasure is to remove all tags with strip_tags function. There is a little comment form in the exercise. Write a form handler that removes all tags from the input and prints the sender's name, comment title and comment text, styled like in the example below. Also remove any extra whitespace from the beginning and end of input with the trim function. Test your code also with input containing both tags and extra whitespace. This is a comment || John Doe Just writing a comment to test the form. If any of the fields is empty (after clean-up), print "Please fill all fields." instead.
странно когда тему понимаю более менее, а практически сложно, не понятно как сделать
0
|
||||||
| 20.12.2022, 16:32 | |
|
Ответы с готовыми решениями:
1
Не понимаю задания
Не понимаю задания |
|
|
||||||
| 21.12.2022, 04:07 | ||||||
Сообщение было отмечено Efrem99 как решение
Решение
0
|
||||||
| 21.12.2022, 04:07 | |
|
Помогаю со студенческими работами здесь
2
Не совсем понимаю задания Не понимаю как делать задания Не понимаю сути задания и реализацию Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
||||
|
PhpStorm 2025.3: WSL Terminal всегда стартует в ~
and_y87 14.12.2025
PhpStorm 2025. 3: WSL Terminal всегда стартует в ~ (home), игнорируя директорию проекта
Симптом:
После обновления до PhpStorm 2025. 3 встроенный терминал WSL открывается в домашней директории. . .
|
Как объединить две одинаковые БД Access с разными данными
VikBal 11.12.2025
Помогите пожалуйста !! Как объединить 2 одинаковые БД Access с разными данными.
|
Новый ноутбук
volvo 07.12.2025
Всем привет.
По скидке в "черную пятницу" взял себе новый ноутбук Lenovo ThinkBook 16 G7 на Амазоне:
Ryzen 5 7533HS
64 Gb DDR5
1Tb NVMe
16" Full HD Display
Win11 Pro
|
Музыка, написанная Искусственным Интеллектом
volvo 04.12.2025
Всем привет. Некоторое время назад меня заинтересовало, что уже умеет ИИ в плане написания музыки для песен, и, собственно, исполнения этих самых песен. Стихов у нас много, уже вышли 4 книги, еще 3. . .
|
От async/await к виртуальным потокам в Python
IndentationError 23.11.2025
Армин Ронахер поставил под сомнение async/ await. Создатель Flask заявляет: цветные функции - провал, виртуальные потоки - решение. Не threading-динозавры, а новое поколение лёгких потоков. Откат?. . .
|
|
Поиск "дружественных имён" СОМ портов
Argus19 22.11.2025
Поиск "дружественных имён" СОМ портов
На странице:
https:/ / norseev. ru/ 2018/ 01/ 04/ comportlist_windows/
нашёл схожую тему. Там приведён код на С++, который показывает только имена СОМ портов, типа,. . .
|
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Programma_Boinc 20.11.2025
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Вот решила сделать интересный приблизительный подсчет, сколько государство потратило на меня денег на покупку инсулинов.
. . .
|
Ломающие изменения в C#.NStar Alpha
Etyuhibosecyu 20.11.2025
Уже можно не только тестировать, но и пользоваться C#. NStar - писать оконные приложения, содержащие надписи, кнопки, текстовые поля и даже изображения, например, моя игра "Три в ряд" написана на этом. . .
|
Мысли в слух
kumehtar 18.11.2025
Кстати, совсем недавно имел разговор на тему медитаций с людьми. И обнаружил, что они вообще не понимают что такое медитация и зачем она нужна. Самые базовые вещи. Для них это - когда просто люди. . .
|
Создание Single Page Application на фреймах
krapotkin 16.11.2025
Статья исключительно для начинающих. Подходы оригинальностью не блещут.
В век Веб все очень привыкли к дизайну Single-Page-Application .
Быстренько разберем подход "на фреймах".
Мы делаем одну. . .
|