Ocena wątku:
- 0 głosów - średnia: 0
- 1
- 2
- 3
- 4
- 5
Problem z formularzem
|
Liczba postów: 2,587
Liczba wątków: 2
Dołączył: 03-04-2010
Reputacja:
58
No właśnie. A poza tym, gdzieś w kodzie miałeś <?php require ('strona.php'); ?> w pliku strona.php.
Liczba postów: 64
Liczba wątków: 15
Dołączył: 27-04-2011
Reputacja:
0
ale kiedy wrzucałem kod na forum usunąłem prawdziwe nazwy plików i dałem przykładowe nazwy.
Liczba postów: 2,587
Liczba wątków: 2
Dołączył: 03-04-2010
Reputacja:
58
(01-06-2011, 00:11)messi19125 napisał(a): ale kiedy wrzucałem kod na forum usunąłem prawdziwe nazwy plików i dałem przykładowe nazwy. To jeszcze raz, spakuj i wrzuć na forum jako załącznik.
Liczba postów: 817
Liczba wątków: 16
Dołączył: 27-04-2011
Reputacja:
45
i daj kod wszystkich plików tych które dołączasz też bo skoro problem pojawia się jak dołączasz pliki to błąd masz w tych plikach, a nie w formularzu
Liczba postów: 64
Liczba wątków: 15
Dołączył: 27-04-2011
Reputacja:
0
".." to nazwy prawdziwych plików.
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 ('dolacz1.php'); ?>
<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 ('dolacz2.php'); ?>
<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 ('dolacz3.php'); ?>
<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 ('dolacz1.php'); ?>
<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 ('dolacz2.php'); ?>
<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 ('dolacz3.php'); ?>
<center>
<div align="center">
<center>
</center></div>
</center></div></div>
</center></div>
</body>
</html>
dolacz1.php
Kod: <table border="0" width="924" height="157" background="..">
<tr>
<td height="2" width="418"></td>
<td height="2"></td>
</tr>
<tr>
<td width="418" height="18"></td>
<td height="18">
<p align="center">Dziś jest:<script language="JavaScript">
<!-- Hide it
// Returns today's date in a string with full day and month names
// by Roger C. Scudder Jr. on 10-2-98
DayName = new Array(7)
DayName[0] = "niedziela"
DayName[1] = "poniedziałek"
DayName[2] = "wtorek"
DayName[3] = "środa"
DayName[4] = "czwartek"
DayName[5] = "piątek"
DayName[6] = "sobota"
MonthName = new Array(12)
MonthName[0] = "stycznia"
MonthName[1] = "lutego"
MonthName[2] = "marca"
MonthName[3] = "kwietnia"
MonthName[4] = "maja"
MonthName[5] = "czerwca"
MonthName[6] = "lipca"
MonthName[7] = "sierpnia"
MonthName[8] = "września"
MonthName[9] = "października"
MonthName[10] = "listopada"
MonthName[11] = "grudnia"
function getDateStr(){
var Today = new Date()
var WeekDay = Today.getDay()
var Month = Today.getMonth()
var Day = Today.getDate()
var Year = Today.getYear()
if(Year <= 600)
Year += 1900
return DayName[WeekDay] + "," + " " + Day + " " + MonthName[Month] + " "+ Year
}
//-->
</script>
<script>document.write(getDateStr() + " r.")</script>
<b>
| </b>
online:<b><?
$plik = "online.txt";
$czas = 30; # CZAS ONLINE
$t = time();
$ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
$u = explode("n", str_replace("r", "", @join("", @file($plik))));
foreach($u as $i => $v) {$e = explode("|", $v);
if($e[0] == $ip || $e[1] < $t) unset($u[$i]);
}
$u[] = $ip . "|" . ($t + $czas);
$fp = fopen($plik, "w");
flock($fp, 2);
fputs($fp, join("n", $u));
flock($fp, 3);
fclose($fp);
echo ' '.count($u);
?></b></font></td>
</tr>
<tr>
<td width="418"></td>
<td></td>
</tr>
<tr>
<td width="418" height="26"></td>
<td height="26">
Pozostało: <b> <SCRIPT LANGUAGE="JavaScript">
<!-- // (c) Henryk Gajewski
var urodz = new Date("June 22, 2011");
var now = new Date();
var ile = urodz.getTime() - now.getTime();
var dni = Math.floor(ile / (1000 * 60 * 60 * 24));
if (dni > 1)
document.write(" " + dni +" dni!")
else if (dni == 1)
document.write(" ")
else if (dni == 0)
document.write(" ")
else
document.write(" ");
// -->
</SCRIPT>
</b> <a href="..">kalendarium</font></a></td>
</tr>
<tr>
<td width="418" height="3"></td>
<td height="3"></td>
</tr>
<tr>
<td width="418" height="20"></td>
<td height="20">
<p align="center">
<b> Jutro: </b>Sprawdzian z Geografii </td>
</tr>
<tr>
<td width="418" height="30"></td>
<td height="30"></td>
</tr>
</table>
<table border="0" width="912" height="90" background="..">
<tr>
<td width="130">
<dl id="menu0">
<dt><br>
HOME</dt>
<dd><a href="..">
Home</a></dd>
</dl>
<script type="text/javascript">
// <![CDATA[
new Menu('menu0');
// ]]>
</script>
</td>
<td width="130">
<dl id="menu1">
<dt>teskt</dt>
<dd><a href="..">teskt</a></dd>
<dd><a href="..">teskt</a></dd>
</dl>
<script type="text/javascript">
// <![CDATA[
new Menu('menu1');
// ]]>
</script></td>
<td width="130">
<dl id="menu2">
<dt>cos tam</dt>
<dd><a href="..">
tekst</a></dd>
<dd><a href="..">
teskt</a></dd></a></dd>
<dd><a href="..">
teskt</a></dd>
</dl>
<script type="text/javascript">
// <![CDATA[
new Menu('menu2');
// ]]>
</script></td>
<td width="130">
<dl id="menu3">
<dt>EXTRAS</dt>
<dd><a href="..">
Forum</a></dd>
<dd><a href="..">
Galeria</a></dd></a></dd></dd>
</dl>
<script type="text/javascript">
// <![CDATA[
new Menu('menu3');
// ]]>
</script></td>
<td width="129">
<dl id="menu4">
<dt>
STOPKA</dt>
<dd><a href="..">
Kontakt</a></dd>
<dd><a href="..">
O stronie</a></dd></a></dd></dd>
</dl>
<script type="text/javascript">
// <![CDATA[
new Menu('menu4');
// ]]>
</script></td>
<td width="237">
<form action="http://www.google.pl" method="get">
<p align="center">
<span class="tnorm">
<input type="text" name="q" />
<input type="submit" value="Szukaj" />
</td>
</tr>
</table>
dolacz2.php
Kod: <table border="0" width="96%" height="29" background="..">
<tr>
<td width="20"></td>
<td><b> tekst</b></td>
</tr>
</table>
<p><p>
<b>
<a href="javascript:void(pokaz_ukryj('tabela2', 'tabela1'))">Ostatni</a></b>
| <b>
<a href="javascript:void(pokaz_ukryj('tabela1', 'tabela2'))">Następny</a></b></p>
<table id="tabela1" style="background-position: 0% 0%; width: 96%;background-image:none; background-repeat:repeat; background-attachment:scroll">
<tr>
<td>
<table border="0" width="297" height="85" background="..">
<tr>
<td height="3" width="96"></td>
<td height="3"></td>
</tr>
<tr>
<td height="22" width="96"></td>
<td height="22"><b><font face="Arial" size="2">tekst</font></b></td>
</tr>
<tr>
<td height="10" width="96"></td>
<td height="10"></td>
</tr>
<tr>
<td height="20" width="96"></td>
<td height="20"><b><font size="2" face="Arial">tekst</font></b></td>
</tr>
<tr>
<td height="22" width="96"></td>
<td height="22"></td>
</tr>
</table>
<table border="0" width="300" height="29" background="..">
<tr>
<td height="25" width="10"></td>
<td height="25"><font face="Arial" size="2">tekst</font></td>
</tr>
</table>
</td>
</tr>
</table>
<table id="tabela2"style="background-position: 0% 0%; width: 96%; display:none; background-image:none; background-repeat:repeat; background-attachment:scroll">
<tr>
<td>
<table border="0" width="297" height="85" background="..">
<tr>
<td height="3" width="96"></td>
<td height="3"></td>
</tr>
<tr>
<td height="22" width="96"></td>
<td height="22"><b><font face="Arial" size="2">tekst</font></b></td>
</tr>
<tr>
<td height="10" width="96"></td>
<td height="10"></td>
</tr>
<tr>
<td height="20" width="96"></td>
<td height="20"><b><font face="Arial" size="2">tekst</font></b></td>
</tr>
<tr>
<td height="22" width="96"></td>
<td height="22"></td>
</tr>
</table>
<table border="0" width="300" height="29" background="..">
<tr>
<td height="25" width="10"></td>
<td height="25"><font face="Arial" size="2">tekst</font></td>
</tr>
</table>
</td>
</tr>
</table> </p>
<p></p>
<table border="0" width="96%" height="29" background="..">
<tr>
<td width="20"></td>
<td><b> Sonda</b></td>
</tr>
</table>
<table border="0" width="96%" height="151">
<tr>
<td>
<p align="center"><!-- Początek kodu html www.websonda.pl -->
<iframe src="http://www.websonda.pl/pokazramke/234234" style="width: 200px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" ></iframe>
<!-- Koniec kodu html www.websonda.pl --> </td>
</tr>
</table>
<table border="0" width="96%" height="29" background="..">
<tr>
<td width="20"></td>
<td><b>teskt</b></td>
</tr>
</table>
<table border="0" width="96%" height="68">
<tr>
<td></td>
</tr>
</table>
<table border="0" width="96%" height="29" background="..">
<tr>
<td width="20"></td>
<td><b> Statystki</b></td>
</tr>
</table>
<table border="0" width="96%" height="156">
<tr>
<td>
<p align="center">
Serwis monitoruje:<br>
<!-- stat.4u.pl NiE KaSoWaC -->
<a target=_top href="http://stat.4u.pl/?admin19125" title="statystyki stron WWW"><img alt="stat4u" src="http://adstat.4u.pl/s4u.gif" border="0"></a>
<script language="JavaScript" type="text/javascript">
<!--
function s4upl() { return "&r=er";}
//-->
</script>
<script language="JavaScript" type="text/javascript" src="http://adstat.4u.pl/s.js?admin19125"></script>
<script language="JavaScript" type="text/javascript">
<!--
s4uext=s4upl();
document.write('<img alt="stat4u" src="http://stat.4u.pl/cgi-bin/s.cgi?i=admin19125'+s4uext+'" width="1" height="1">')
//-->
</script>
<br>
<br>
Strona najlepiej działa w:<br>
<img border="0" src=".." width="122" height="58"></p></td>
</tr>
</table>
dolacz3.php
Kod: <table class="tabelka" border="0" cellspacing="0" width="924" height="86" background="..">
<tbody>
<tr align="center">
<td align="center" valign="top" width="15" height="24">
</td>
<td align="center" valign="top" width="545" height="24">
</td>
<td align="center" valign="top" width="448" height="24">
</td>
<td align="center" valign="top" width="16" height="24">
</td>
</tr>
<tr align="center">
<td align="center" valign="top" width="15" height="62">
</td>
<td align="center" valign="top" width="545" height="62">
<p align="left">Kopiowanie
zawartości strony zabronione.</td>
<td align="center" valign="top" width="448" height="62">
<p align="right">by<a href="..">
messi</a></td>
<td align="center" valign="top" width="16" height="62">
</td>
</tr>
</tbody></table>
Liczba postów: 2,587
Liczba wątków: 2
Dołączył: 03-04-2010
Reputacja:
58
I się dziwisz? <form action="http://www.google.pl" method="get"> w pliku dolacz1.php
A mnie chodziło o to, abyś spakował wszystko i wrzucił jako załącznik. Ciężko się czyta inaczej.
Liczba postów: 817
Liczba wątków: 16
Dołączył: 27-04-2011
Reputacja:
45
szczególnie ciężko się czyta kod, który jest wymieszany i zbudowany na tabelach...
Liczba postów: 2,587
Liczba wątków: 2
Dołączył: 03-04-2010
Reputacja:
58
(01-06-2011, 20:06)hieroshima napisał(a): szczególnie ciężko się czyta kod, który jest wymieszany i zbudowany na tabelach... To już pominąłem  Ale ogólnie to niezłe spaghetti...
Liczba postów: 64
Liczba wątków: 15
Dołączył: 27-04-2011
Reputacja:
0
Tak myślałem że to o to chodzi. Już działa.
Wielkie dzięki za pomoc.
|
Podobne wątki… |
Wątek: |
Autor |
Odpowiedzi: |
Wyświetleń: |
Ostatni post |
|
Banalny problem z formularzem |
R_Rafalsky |
10 |
5,642 |
12-07-2012, 18:20
Ostatni post: Pedro84
|
|
problem z formularzem |
tenorek |
8 |
4,609 |
09-02-2012, 18:46
Ostatni post: kornell
|
|
Problem z linkami stron w XML oraz formularzem kontaktowym |
mihau87 |
0 |
1,764 |
31-01-2012, 00:49
Ostatni post: mihau87
|
|
Jak dodac kod php z formularzem newsów |
neneth |
7 |
6,239 |
04-05-2011, 22:43
Ostatni post: geforce
|
|
Wyswietlanie elementu pod formularzem |
jingels |
3 |
3,249 |
22-03-2011, 21:46
Ostatni post: jingels
|
Użytkownicy przeglądający ten wątek: 2 gości
|
|
Sponsorzy i przyjaciele
|
|
|