<?php function form(){ echo '<form action="zapis.php" method="post"> <input type="text" name="email" style="width: 200px;" value="E-mail" onfocus="if (this.value == “E-mail") {this.value = "";}" onblur="if (this.value == "") {this.value = "E-mail";}"/><br /> <input type="text" name="email2" style="width: 200px;" value="Powtórz e-mail" onfocus="if (this.value == "Powtórz e-mail) {this.value = "";}" onblur="if (this.value == "") {this.value = "Powtórz e-mail";}"/><br /> <input type="password" name="pass" style="width: 200px;" value="Haslo" onfocus="if (this.value == "Haslo") {this.value = "";}" onblur="if (this.value == "") {this.value = "Haslo";}"/><br /> <input type="password" name="pass2" style="width: 200px;" value="Powtórz hasło" onfocus="if (this.value == "Powtórz hasło") {this.value = "";}" onblur="if (this.value == "") {this.value = "Powtórz hasło";}"/><br /> <input type="text" name="imie" style="width: 200px;" value="Imie" onfocus="if (this.value == "Imie") {this.value = "";}" onblur="if (this.value == "") {this.value = "Imie";}"/><br /> <input type="text" name="nazwisko" style="width: 200px;" value="Nazwisko" onfocus="if (this.value == "Nazwisko") {this.value = "";}" onblur="if (this.value == "") {this.value = "Nazwisko";}"/><br /> <input type="text" name="ulica" style="width: 200px;" value="Ulica" onfocus="if (this.value == "Ulica") {this.value = "";}" onblur="if (this.value == "") {this.value = "Ulica";}"/><br /> <input type="text" name="dom" style="width: 200px;" value="Numer domu" onfocus="if (this.value == "Numer domu") {this.value = "";}" onblur="if (this.value == "") {this.value = "Numer domu";}"/><br /> <input type="text" name="mieszk" style="width: 200px;" value="Numer mieszkania" onfocus="if (this.value == "Numer mieszkania) {this.value = "";}" onblur="if (this.value == "") {this.value = "Numer mieszkania";}"/><br /> <input type="text" name="kod" style="width: 50px;" value="Kod pocztowy" onfocus="if (this.value == "Kod pocztowy") {this.value = "";}" onblur="if (this.value == "") {this.value = "Kod pocztowy";}"/> <input type="text" name="miasto" style="width: 150px;" value="Miasto" onfocus="if (this.value == "Miasto") {this.value = "";}" onblur="if (this.value == "") {this.value = "Miasto";}"/><br /> <input type="text" name="telkom" style="width: 200px;" value="Telefon" onfocus="if (this.value == "Telefon") {this.value = "";}" onblur="if (this.value == "") {this.value = "Telefon";}"/><br /> <input type="submit" value="Rejestruj" /> </form>'; ?>
Nie działa mi w tym kodzie ani onblur ani onfocus jest to spowodowane z tego mi się wydaje cudzysłowami, mam podobny skrypt i tam ta druga część go jest w apostrofach(zaznaczyłem pogrubieniem)
nie problem to zmienić ale wtedy jest jakiś konflikt z apostrofem przy echo, przeglądarka wyskakuje z błędem składni i unexpected '
Bardzo proszę o pomoc jak to rozwiązać