No i tak stało się oto moj kolejny błąd nie dodaje usera do bazy ;/ tylko wywala błąd ;/
Błąd:
Kod
Warning: mysql_query() [http://www.mysql.com/doc]: Column count doesn't match value count at row 1 in H:\n\modules\rejestracja.php on line 69
Wystąpił błąd w dodawaniu usera.
Strona Główna
a to kod
<?
bbcode($str,$mala_tresc,$wlasciwa_tresc,$text,$podpis);
function reg()
{
global $login,$haslo,$email,$miasto,$www,$gg,$tlen,$poziom,$podpis; echo '<form name="dodaj_us" action="rejestracja.php?mode=ok" method="POST"> <table width="98%" align="center"><tr><td class="uni_01">Login:<span style="color:#ff0000">*</span></td>
<td class="uni_01"><input type="text" name="login" maxlength="16" class="textbox" style="width:200px;"></td></tr>
<tr>
<td class="uni_01">Hasło:<span style="color:#ff0000">*</span></td>
<td class="uni_01"><input type="text" name="haslo" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01">E-Mail:<span style="color:#ff0000">*</span></td>
<td class="uni_01"><input type="text" name="email" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01">Sk±d Jeste¶:</td>
<td class="uni_01"><input type="text" name="miasto" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01">Adres www:</td>
<td class="uni_01"><input type="text" name="www" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01">Gadu-Gadu:</td>
<td class="uni_01"><input type="text" name="gg" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01">Tlen:</td>
<td class="uni_01"><input type="text" name="tlen" maxlength="16" class="textbox" style="width:200px;"><input type="hidden" name="poziom" value="0" maxlength="16" class="textbox" style="width:200px;"></td>
</tr>
<tr>
<td class="uni_01" valign="top">Podpis:</td>
<td class="uni_01">
<textarea name="podpis" rows="5" class="textbox" style="width:295px"></textarea><br>
</td>
</tr>
<tr>
<td class="uni_01" valign="top"></td>
<td class="uni_01">
<input type="submit" value="Rejestruj" />
</td>
</tr>';
}
function ok()
{
global $login,$haslo,$email,$miasto,$www,$gg,$tlen,$poziom,$podpis; $query=mysql_query("SELECT login FROM uzytkownicy WHERE login='".$login."'"); if (!$login) {
echo 'Nie podałe¶ Loginu'; } elseif (!$haslo){
echo 'Nie podałe¶ hasła'; } elseif (!$email)
{
echo 'Nie podałe¶ e-maila'; {
if($www=='http://') $www = '';
if($gg=='gg:') $gg = '';
if($tlen=='tlen:') $tlen = '';
$query1 = "INSERT INTO uzytkownicy VALUES(NOT NULL, '$login', 'md5($haslo)', '$email', '$miasto', '$www', '$gg', '$tlen', '$poziom', '$podpis')";
if($result)
{
echo '<br>Użytkownik Został Dodany.<br>'; }
else
{
echo '<br>Wyst±pił bł±d w dodawaniu usera.<br><br>'; }
}
else
{
// user istnieje
echo 'Użytkownik o podanym loginie już istnieje, proszę wybrać inny login'; echo '<a href="javascript:history.back();">Cofnij</a>'; }
echo '<a href="index.php">Strona Główna</a>'; }
?>