bahy
04-07-2003, 08:22 PM
Can anyone help me to mix my project with php (session hadling ) and javescript ?
All i wanna do is making my visitors to enter their username and pass word - using session , and the javascript code is used for checking if the entered username and pass word is null , if null then do the alert . My code is like this
<?
session_start();
?>
<script language = "javascript">
function Validate()
{
if document.LOGIN.username.value="" || document.LOGIN.password.value="")
{
alert("You should enter username and password to login !");
}
</script>
<?
.....
........
<form method=post action = login.php name=LOGIN onSubmit = return Validate() >
...........
...........
</form>
..........
?>
The first problem is on the top of the page there is a scentence "Warning: open(/tmp\sess_0ccee9d6f5ad6c764fcd7fd1682c3496, O_RDWR) failed: m (2) in d:\fox\www\login.php on line 2) . How can i solve this .
and the next problem is that when i don't type a word in username and password and click on submit button , it goes to the login succeful page (it did not alert ) . Where does it go wrong ?
Waiting for your help .
All i wanna do is making my visitors to enter their username and pass word - using session , and the javascript code is used for checking if the entered username and pass word is null , if null then do the alert . My code is like this
<?
session_start();
?>
<script language = "javascript">
function Validate()
{
if document.LOGIN.username.value="" || document.LOGIN.password.value="")
{
alert("You should enter username and password to login !");
}
</script>
<?
.....
........
<form method=post action = login.php name=LOGIN onSubmit = return Validate() >
...........
...........
</form>
..........
?>
The first problem is on the top of the page there is a scentence "Warning: open(/tmp\sess_0ccee9d6f5ad6c764fcd7fd1682c3496, O_RDWR) failed: m (2) in d:\fox\www\login.php on line 2) . How can i solve this .
and the next problem is that when i don't type a word in username and password and click on submit button , it goes to the login succeful page (it did not alert ) . Where does it go wrong ?
Waiting for your help .