
Mam juz dwa pliki :
register.php3
Kod
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Rejstracja</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<form method="post" action="regist.php3">
<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">
<tr>
<td colspan="2" class="gora"><strong>Wypełnij formularz :</strong></td>
</tr>
<tr>
<td width="124" class="text"><font class="alert">*</font>Nick lub imię : </td>
<td width="155" class="text"><input type="text" name="imie" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td height="21" class="text"><font class="alert">*</font>Miejscowość : </td>
<td class="text"><input type="text" name="miejscowosc" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td height="24" class="text"><font class="alert">*</font>Wojewodztwo :</td>
<td class="text"><SELECT NAME="wojewodztwo" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;">
<OPTION title="1">dolnośląskie</option>
<OPTION title="2">kujawsko-pomorskie</option>
<OPTION title="3">łódzkie</option>
<OPTION title="4">lubelskie</option>
<OPTION title="5">lubuskie</option>
<OPTION title="6">małopolskie</option>
<OPTION title="7">mazowieckie</option>
<OPTION title="8">opolskie</option>
<OPTION title="9">podkarpackie</option>
<OPTION title="10">podlaskie</option>
<OPTION title="11">pomorskie</option>
<OPTION title="12">śląskie</option>
<OPTION title="13">świętokrzyskie</option>
<OPTION title="14">warmińsko-mazurskie</option>
<OPTION title="15">wielkopolskie</option>
<OPTION title="16">zachodnio-pomorskie</option>
<OPTION title="17">cała Polska</option>
<OPTION title="18">zagranicą</option>
</select>
</td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Kategoria : </td>
<td class="text"><SELECT NAME="kategoria" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;">
<OPTION title="1">Pani szuka Pana</option>
<OPTION title="2">Pan szuka Panią</option>
<OPTION title="3">Pan szuka Pana</option>
<OPTION title="4">Pani szuka Panią</option>
</SELECT> </td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Wiek : </td>
<td class="text"><input type="text" name="wiek" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>E-mail :</td>
<td class="text"><input type="text" name="mail" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text">&Telefon :</td>
<td class="text"><input type="text" name="telefon" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text">&Inny kontakt :</td>
<td class="text"><input type="text" name="kontakt" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Treść :</td>
<td class="text"><textarea rows="3" cols="20" name="tresc" title="tresc" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></textarea></td>
</tr>
<tr>
<td class="text">&Twoje zdjęcie :</td>
<td class="text"><input name="foto" type="file" style="font: 10px Verdana; width: 170;"></td>
</tr>
<tr>
<td colspan="2" align="center" class="text"><input type="submit" value="Wyślij" name="submit" style="background: #75B375; border: 1px solid; border-color:black; font-family: Verdana; font-size: 10px; font-weight: bold; color: white; "></td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>Rejstracja</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<form method="post" action="regist.php3">
<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">
<tr>
<td colspan="2" class="gora"><strong>Wypełnij formularz :</strong></td>
</tr>
<tr>
<td width="124" class="text"><font class="alert">*</font>Nick lub imię : </td>
<td width="155" class="text"><input type="text" name="imie" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td height="21" class="text"><font class="alert">*</font>Miejscowość : </td>
<td class="text"><input type="text" name="miejscowosc" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td height="24" class="text"><font class="alert">*</font>Wojewodztwo :</td>
<td class="text"><SELECT NAME="wojewodztwo" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;">
<OPTION title="1">dolnośląskie</option>
<OPTION title="2">kujawsko-pomorskie</option>
<OPTION title="3">łódzkie</option>
<OPTION title="4">lubelskie</option>
<OPTION title="5">lubuskie</option>
<OPTION title="6">małopolskie</option>
<OPTION title="7">mazowieckie</option>
<OPTION title="8">opolskie</option>
<OPTION title="9">podkarpackie</option>
<OPTION title="10">podlaskie</option>
<OPTION title="11">pomorskie</option>
<OPTION title="12">śląskie</option>
<OPTION title="13">świętokrzyskie</option>
<OPTION title="14">warmińsko-mazurskie</option>
<OPTION title="15">wielkopolskie</option>
<OPTION title="16">zachodnio-pomorskie</option>
<OPTION title="17">cała Polska</option>
<OPTION title="18">zagranicą</option>
</select>
</td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Kategoria : </td>
<td class="text"><SELECT NAME="kategoria" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;">
<OPTION title="1">Pani szuka Pana</option>
<OPTION title="2">Pan szuka Panią</option>
<OPTION title="3">Pan szuka Pana</option>
<OPTION title="4">Pani szuka Panią</option>
</SELECT> </td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Wiek : </td>
<td class="text"><input type="text" name="wiek" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>E-mail :</td>
<td class="text"><input type="text" name="mail" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text">&Telefon :</td>
<td class="text"><input type="text" name="telefon" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text">&Inny kontakt :</td>
<td class="text"><input type="text" name="kontakt" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></td>
</tr>
<tr>
<td class="text"><font class="alert">*</font>Treść :</td>
<td class="text"><textarea rows="3" cols="20" name="tresc" title="tresc" style="font: 10px Verdana, Arial, Helvetica, sans-serif; width: 130;"></textarea></td>
</tr>
<tr>
<td class="text">&Twoje zdjęcie :</td>
<td class="text"><input name="foto" type="file" style="font: 10px Verdana; width: 170;"></td>
</tr>
<tr>
<td colspan="2" align="center" class="text"><input type="submit" value="Wyślij" name="submit" style="background: #75B375; border: 1px solid; border-color:black; font-family: Verdana; font-size: 10px; font-weight: bold; color: white; "></td>
</tr>
</table>
</form>
</body>
</html>
oraz
regist.php3
[php:1:0273f3a91c]<?
if (($imie=="") || ($miejscowosc=="") || ( $wojewodztwo=="") || ($kategoria=="") || ($wiek=="") || ($mail=="") || ($tresc=="")) {
if (($imie=="")){
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wpisać imię lub nick</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($miejscowosc=="")) {
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wpisać miejscowość</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($wojewodztwo=="")) {
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wybrać wpjewództwo</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($kategoria=="")) {
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wybrać kategorię</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($wiek=="")) {
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wpisać wiek</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($mail=="")){
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wpisać e-mail</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }
elseif (($tresc=="")) {
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Proszę wpisać treść</strong><br><a href="java script: history.go(-1)">Popraw</a>";
echo "</td></tr>";
echo "</table>"; }}
else {
$path="baza/";
$nr=1;
while(file_exists($path.$nr.'.txt'))
{
$nr++;
}
$dane="$imie |**| $miejscowosc |**| $wojewodztwo |**| $kategoria |**| $wiek |**| $mail |**| $tresc |**| $telefon |**| $kontakt |**| $foto";
$plik=fopen($path.$nr.'.txt',"w");
chmod($path.$nr.'.txt', 0666);
flock($plik, 2);
fwrite($plik, $nr. "|**|". "$danen");
flock($plik, 3);
fclose($plik);
echo "<table width="289" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#000000">";
echo "<tr><td class="gora" align="center">";
echo "<strong>Dziękujemy za zapisanie się.<br><a href="java script: history.go(-1)">|| Do formularza ||</a></strong>";
echo "</td></tr>";
echo "</table>";
exit();
}
?>[/php:1:0273f3a91c]
wszystko jest pieknie i ladnie

no to bylo popierwsze a teraz chcialbym zrobic jeszcze jeden skrypcik ktory by wczytywal dane z plikow .txt ale nie wszystkie od razu czyli jak tam bylo ze $dane="$imie |**| $miejscowosc |**| $wojewodztwo |**| $kategoria |**| $wiek |**| $mail |**| $tresc |**| $telefon |**| $kontakt |**| $foto"; to chcialbym zeby wczytywal np. $imie, i $miejscowosc a reszte za podaniem hasla. Mam nadzeje ze mi pomozecie 8)