Здравствуйте,
На сайте нужно сделать форму, в которой можно выбрать несколько ответов. Но у меня вместо нескольких выбранных результатов с сheckbox приходит на почту слово "array". Если убрать квадратные скобки перед name, то будет приходить только последний выбранный checkbox. Помогите пожалуйста советом.
<form action="http://site.com/brief.php" method="post" name="MyBrief">
<p style="font-size: 17pt; font-weight: 600;">What features would you like on your website?</p>
<p><input name="features[]" type="checkbox" value="Easy to update by non technical people" /> <br />Easy to update by non technical people</p>
<p><input name="features[]" type="checkbox" value="Shopping cart or other ecommerce" /> <br />Shopping cart or other ecommerce</p>
<p><input name="features[]" type="checkbox" value="Optimisation for mobie phones" /><br /> Optimisation for mobie phones</p>
<p><input name="features[]" type="checkbox" value="Photo and media galleries" /> <br />Photo and media galleries</p>
<p><input name="features[]" type="checkbox" value="Feedback/contact forms" /> <br />Feedback/contact forms</p>
<p><input name="features[]" type="checkbox" value="Members only section" /> <br />Members only section</p>
<p><input name="features[]" type="checkbox" value="Blog" /> <br />Blog</p>
<p><input name="features[]" type="checkbox" value="Surveys" /> <br />Surveys</p>
<p><input name="features[]" type="checkbox" value="Film/Audio" /><br /> Film/Audio</p>
<p><input name="features[]" type="checkbox" value="Banners or advertisements" /><br /> Banners or advertisements</p>
<p><input name="features[]" type="checkbox" value="Booking Module" /><br /> Booking Module</p>
<p><input name="features[]" type="checkbox" value="FAQ" /><br /> FAQ</p>
<p><input name="features[]" type="checkbox" value="Flash Animation" /> <br />Flash Animation</p>
<p><input name="features[]" type="checkbox" value="Subscribe box for Email Marketing" /><br /> Subscribe box for Email Marketing</p>
</form>
php
<meta http-equiv='refresh' content='6; url=https://site.com/design'>
<meta charset="UTF-8" />
<?php
if (isset($_POST['name'])) {$name = $_POST['name']; if ($name == '') {unset($name);}}
if (isset($_POST['email'])) {$email = $_POST['email']; if ($email == '') {unset($email);}}
if (isset($_POST['phone'])) {$phone = $_POST['phone']; if ($phone == '') {unset($phone);}}
if (isset($_POST['country'])) {$country = $_POST['country']; if ($country == '') {unset($country);}}
if (isset($_POST['address'])) {$address = $_POST['address']; if ($address == '') {unset($address);}}
if (isset($_POST['you'])) {$you = $_POST['you']; if ($you == '') {unset($you);}}
if (isset($_POST['budget'])) {$budget = $_POST['budget']; if ($budget == '') {unset($budget);}}
if (isset($_POST['background'])) {$background = $_POST['background']; if ($background == '') {unset($background);}}
if (isset($_POST['why'])) {$why = $_POST['why']; if ($why == '') {unset($why);}}
if (isset($_POST['competitors'])) {$competitors = $_POST['competitors']; if ($competitors == '') {unset($competitors);}}
if (isset($_POST['audience'])) {$audience = $_POST['audience']; if ($audience == '') {unset($audience);}}
if (isset($_POST['like'])) {$like = $_POST['like']; if ($like == '') {unset($like);}}
if (isset($_POST['dislike'])) {$dislike = $_POST['dislike']; if ($dislike == '') {unset($dislike);}}
if (isset($_POST['examples'])) {$examples = $_POST['examples']; if ($examples == '') {unset($examples);}}
if (isset($_POST['style'])) {$style = $_POST['style']; if ($style == '') {unset($style);}}
if (isset($_POST['words'])) {$words = $_POST['words']; if ($words == '') {unset($words);}}
if (isset($_POST['colors'])) {$colors = $_POST['colors']; if ($colors == '') {unset($colors);}}
if (isset($_POST['language'])) {$language = $_POST['language']; if ($language == '') {unset($language);}}
if (isset($_POST['logo'])) {$logo = $_POST['logo']; if ($logo == '') {unset($logo);}}
if (isset($_POST['guide'])) {$guide = $_POST['guide']; if ($guide == '') {unset($guide);}}
if (isset($_POST['features'])) {$features = $_POST['features']; if ($features == '') {unset($features);}}
if (isset($_POST['sideortop'])) {$sideortop = $_POST['sideortop']; if ($sideortop == '') {unset($sideortop);}}
if (isset($_POST['sections'])) {$sections = $_POST['sections']; if ($sections == '') {unset($sections);}}
if (isset($_POST['updating'])) {$updating = $_POST['updating']; if ($updating == '') {unset($updating);}}
if (isset($_POST['skills'])) {$skills = $_POST['skills']; if ($skills == '') {unset($skills);}}
if (isset($_POST['other'])) {$other = $_POST['other']; if ($other == '') {unset($other);}}
if (isset($name) && isset($email) && isset($phone) && isset($country) && isset($address) && isset($you) && isset($budget) && isset($background) && isset($why) && isset($competitors) && isset($audience) && isset($like) && isset($dislike) && isset($examples) && isset($style) && isset($words) && isset($colors) && isset($language) && isset($logo) && isset($guide) && isset($features) && isset($sideortop) && isset($sections) && isset($updating) && isset($skills) && isset($other)){
$address = "admin@site.com";
$sub = "Brief";
$mes = "Client Name: $name \nE-mail: $email \nPhone: $phone \nCountry: $country \nPostal Address: $address \nClient is: $you \nProject Budget: $budget \nBackground information: $background \nWhy do you need a website?: $why \nWho are your competitors?: $competitors \nWho is your target audience?: $audience \nWhat do you like about websites?: $like \nWhat do you dislike about websites?: $dislike \nProvide examples of websites (or parts of websites) you like the design and functionality.: $examples \nWhat Style would you prefer for your website?: $style \nAre there any other words you would like to use to describe the required look?: $words \nDo you have any colours in mind for your website?: $colors \nHow many language versions should your future website have?: $language \nPlease upload your logo if you have it.: $logo \nIs there an official corporate style guide I need to follow? Please upload PDF version.: $guide \nWhat features would you like on your website?: $features \nWould you prefer side or top level navigation?: $sideortop \nInsert the sections that should be present on your website. E.g. Home page, News, About us, Product catalogue, FAQ, Contact etc.: $sections \nWho will be updating and promoting your website?: $updating \nWhat level of computer and internet skills do they have?: $skills \nOther Comments?: $other";
$send = mail ($address,$sub,$mes,"Content-type:text/plain; charset = UTF-8\r\nFrom:$email");
if ($send == 'true')
{echo "The brief has been sent. I will reply by email as soon as possible. Talk to you soon, Admin";}
else {echo "Oops, There was a problem sending the brief.";}
}
else
{
echo "Please, fill out all required fields";
}
?>
Виртуальный выделенный сервер (VDS) становится отличным выбором
Проблема заключается в том, что когда достигается конец страницы, начинает исчезать верхний блок хрома с адресной строкой, в это время появляется...
кнопка вызывает функцию myFunction, она посылает гет запрос с данными в opportunitiesphp , а он печатает строку в новом окне
Пытаюсь написать два триггера, проверяющие целостность данных при вставке и изменении данных в PHPMyAdmin