<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <img src="blankface.jpg" width="161" height="350" alt="" style="float:right" /> <img name="elvislogo" src="elvislogo.gif" width="300" height="32" border="0" alt="Zrób ze mnie Elvisa" /> Napisz i wyślij wiadomość do osób z listy mailingowej.</p>
<?php $from = 'edward@zrobzemnieelvisa.com'; $subject = $_POST['subject']; $text = $_POST['elvismail']; $output_form = false; // CZY TO JEST KONIECZNE? // Wiadomo, że pola $subject i $text są puste. $output_form = true; } $output_form = true; } $output_form = true; } } else { $output_form = true; } $dbc = mysqli_connect('data.zrobzemnieelvisa.com', 'edward', 'theking', 'elvis_store') $query = "SELECT * FROM email_list"; $result = mysqli_query($dbc, $query) while ($row = mysqli_fetch_array($result)){ $to = $row['email']; $first_name = $row['first_name']; $last_name = $row['last_name']; $msg = "Drogi $first_name $last_name,\n$text"; } mysqli_close($dbc); } if ($output_form) { ?>
<?php } ?>
$output_form = false; - czy inicjowanie zmiennej na wartość na false jest konieczne?
bez tego działa tak samo. Bez $output_form = false; to prawidłowy kod? Jeśli nie, to czemu?