Ответ
jeck 11.09.2003 14:00
Хорошо попробую вам обьяснить..
Вот регистрация проходит успешно
а вот сверить пороль и имя не могу в чём ошибка???
auto.p
@auto[]
$connect_string[
mysql://root@wersia.ru/baza]
___________________
index.html
<a href="input.html">Войти</a>
<form method="POST">
<p>
Имя: <input name="name">
</p>
Пороль: <input name="pass">
</p>
<p>
<input type="submit" value="Регистрация" name="posted">
</p>
</form>
^if(def $form:name && def $form:pass ){
^connect[$connect_string]{
^void:sql{insert into book
(name,pass)
values
('$form:name', '$form:pass')
}
Вы зарегестрированы
</br>
Для входа жми <a href="input.html">Сюда</a>
}
}{
Для регистрации необходимо заполнить все поля
}
_____________________
input.html
<form method="POST" action="input.html" >
<p> Имя: <input type="text" name="name"> </p>
<p> Имя для сравнения: <input type="text" name="pass"> </p>
<p> <input type="submit" value="Войти" name="posted"> </p>
</form>
^if(def $form:name && def $form:pass){
^connect[connect_string]{
^if(^int:sql{
select
count(*)
from
book
where
name='$form:name' AND pass='$form:pass'}) {Равны}{не равны}
}
}
- вопрос по БД, jeck 11.09.2003 10:14
- Ответ, Pavel Titov 11.09.2003 10:45
- Ответ, jeck 11.09.2003 11:18
- Ответ, redactor [M] 11.09.2003 10:39 / 11.09.2003 10:41