Problem z formularzem - Wersja do druku
+- Forum Webmastera, HTML, CSS, PHP, MySQL, Hosting, Domeny - Forum dla Webmasterów (https://www.webmastertalk.pl)
+-- Dział: Technologie internetowe - tworzenie stron WWW (https://www.webmastertalk.pl/forum-technologie-internetowe-tworzenie-stron-www)
+--- Dział: Początkujący webmaster (https://www.webmastertalk.pl/forum-poczatkujacy-webmaster)
+--- Wątek: Problem z formularzem (/thread-problem-z-formularzem--6925)
|
RE: Problem z formularzem - hieroshima - 30-05-2011
jakiś pokręcony ten kod masz. Po c razy doctype po co 2 razy w jednym pliku <style> </style> wszystkie style w tyym powinny siedzieć. Tylko raz robisz blok <style></style> i tam wzucasz każdy styl. Po co Ci <p> przycisk aktualizuj </p> ?
RE: Problem z formularzem - messi19125 - 31-05-2011
Już nic nie rozumiem, przecież wszystko powinno chodzić dobrze no nie? poprawiłem te błędy ale dalej bez skutku ;/
RE: Problem z formularzem - messi19125 - 31-05-2011
Odkryłem że to znowu wina require(), bez tego wszystko chodzi świetnie ale z tym require() to już mówiłem że przenosi mnie na google.pl
RE: Problem z formularzem - Pedro84 - 31-05-2011
(31-05-2011, 14:11)messi19125 napisał(a): Odkryłem że to znowu wina require(), bez tego wszystko chodzi świetnie ale z tym require() to już mówiłem że przenosi mnie na google.pl Wrzuć cały kod spakowany, bo gdzieś namieszałeś nieźle w takim razie.
RE: Problem z formularzem - messi19125 - 31-05-2011
Że namieszałem to wiem ale nie wiem czy ma wpływ na to.
strona.php:
Kod: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
a{ text-decoration: none; color: #000000; }
a:hover { text-decoration: underline; color: #0066FF; }
p { font-family: arial; font-size: small }
</style>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
// <![CDATA[
function pokaz_ukryj(pokaz, ukryj) {
document.getElementById(pokaz).style.display = "block";
document.getElementById(ukryj).style.display = "none";
}
//]]
</script>
<title>strona</title>
<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
// -->
</script>
</head>
<body background="..">
<center>
<div align="center">
<center>
<div style="padding:0px;font-size:9px;font-family:Verdana;text-align:center;"><center>
<?php require (''); ?>
<table class="tabelka" border="0" cellspacing="0" width="924" height="10" background="..">
<tbody>
<tr align="center">
<td align="center" valign="top" width="922" height="10">
</td>
</tr>
</tbody></table>
<table class="tabelka" border="0" cellspacing="0" width="924" height="595" background="..">
<tbody>
<tr align="center">
<td align="center" valign="top" width="320" height="595">
<?php require (''); ?>
<td align="center" valign="top" width="601" height="595">
<table class="tabelka" border="0" cellspacing="0" width="576" height="593">
<tbody>
<td align="center" valign="top" width="574" height="593">
<p align="left"><b><font face="Verdana" size="3">Kartkówki</font></b></p>
<p align="left"> </p>
<p align="left"><h1 align="left">Komentarz klienta</h1>
<p align="left">Proszę przekazać nam swoje komentarze.<p align="left">
<form action="31.php" method="post">
<p align="left">Nazwisko:<br />
<input type="text" name="nazwa" size="40" /></p>
<p align="left">Adres poczty elektronicznej:<br />
<input type="text" name="email" size="40" /></p>
<p align="left">Lala:<br />
<input type="text" name="lala" size="40" /></p>
<p align="left">
<input type="submit" value="Wyślij komentarz" />
</p>
</form></p>
</tbody></table>
</tr>
</tbody></table>
<?php require (''); ?>
<center>
<div align="center">
<center>
</center></div>
</center></div></div>
</center></div>
</body>
</html>
przetworz.php:
Kod: <?php
// utworzenie krótkich nazw zmiennych
$nazwa = $_POST['nazwa'];
$email = $_POST['email'];
$lala = $_POST['lala'];
// zdefiniowanie danych statycznych
$adresdo = "[email protected]";
$temat = "Komentarz ze strony WWW";
$zawartosc = "Nazwa klienta: ".$nazwa."\n"
."Adres pocztowy: ".$email."\n"
."lala: ".$lala."\n";
$adresod = "[email protected]";
// wywołanie funkcji mail() wysyłającej wiadomość pocztową
mail($adresdo, $temat, $zawartosc, $adresod);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
a{ text-decoration: none; color: #000000; }
a:hover { text-decoration: underline; color: #0066FF; }
p { font-family: arial; font-size: small }
</style>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
// <![CDATA[
function pokaz_ukryj(pokaz, ukryj) {
document.getElementById(pokaz).style.display = "block";
document.getElementById(ukryj).style.display = "none";
}
//]]
</script>
<title>przetworz</title>
<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
// -->
</script>
</head>
<body background="..">
<center>
<div align="center">
<center>
<div style="padding:0px;font-size:9px;font-family:Verdana;text-align:center;"><center>
<?php require (''); ?>
<table class="tabelka" border="0" cellspacing="0" width="924" height="10" background="..">
<tbody>
<tr align="center">
<td align="center" valign="top" width="922" height="10">
</td>
</tr>
</tbody></table>
<table class="tabelka" border="0" cellspacing="0" width="924" height="595" background="..">
<tbody>
<tr align="center">
<td align="center" valign="top" width="320" height="595">
<?php require (''); ?>
<td align="center" valign="top" width="601" height="595">
<table class="tabelka" border="0" cellspacing="0" width="576" height="593">
<tbody>
<td align="center" valign="top" width="574" height="593">
<p align="left"><b><font face="Verdana" size="3">cos tam</font></b></p>
<p align="left"> </p>
<p align="left"> <?php
if (!eregi('^[a-zA-z0-9_\-\.]+@[a-zA-z0-9\-]+\.[a-zA-z0-9\-\.]+$', $mail)) {
echo "<p>Nie poprwany adres e-mail.</p>";
exit;
} else {
echo "<p>Dane zostały zaaktualizowane i niebawem pojawią się na stronie.</p>";
}
?></p>
</tbody></table>
</tr>
</tbody></table>
<?php require (''); ?>
<center>
<div align="center">
<center>
</center></div>
</center></div></div>
</center></div>
</body>
</html>
RE: Problem z formularzem - Pedro84 - 31-05-2011
Co to ma być?
Kod: <?php require (''); ?>
RE: Problem z formularzem - messi19125 - 31-05-2011
No to jest odniesienie się do jakiegoś pliku, np.:
<?php require('strona.php') ?>
RE: Problem z formularzem - Pedro84 - 31-05-2011
(31-05-2011, 18:45)messi19125 napisał(a): No to jest odniesienie się do jakiegoś pliku, np.:
<?php require('strona.php') ?> To czemu miałeś puste? Jak podajesz poprawną ścieżkę, to też masz błąd?
RE: Problem z formularzem - messi19125 - 31-05-2011
require() cały czas wyświetla mi się prawidłowo tylko podczas naciśnięciu przycisku wysyłającego formularz przenosi mnie na google.pl a powinno na przetworz.php. A bez require() formularz działa mi prawidłowo tylko że nie wyświetla mi się to co tam miałem w tym require
RE: Problem z formularzem - hieroshima - 31-05-2011
ale z twojego kodu wynika ze w require jest nic - dołączasz nic
|