Jump to content

HAN!

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by HAN!

  1. you all people here seems you know how to work with PHP sessions amd login pages, so i have this question, i have a login page and i want for the user after he login for a certain time which i sepecify to be logout automatically, i need to know how to timeout logout a logeed in user??? thanks for any help.
  2. still for now i cant make the user timeout logout, how to make this happen? do i have to change anything in php.ini? or there is certain thing to write in the script? thanks for any help.
  3. i need logout the user by timeout while he is logeed in, is there any code i can write in my script to do this or i just have to change my php.ini, and how to change my php.ini? thanks
  4. i know nothing well happen byitself i have a login page using session and im testing it there, also with restarting the server nothing happened, isn't there any way to do this with a function inside the script???
  5. i changed for 1 and i waited for 3 minutes but nothing happened, is there a way to do it using php codes inside the script?
  6. Document expires after n minutes. session.cache_expire = 180 Is this which i have to change??
  7. i made a login page, and i made a logout button too, but i want to make a timed logout, i mean after 5 min for example the user is logout automatically thanxs
  8. thanks for ur help, the problem was solved
  9. Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Program Files\wamp\www\hani\login.php:15) in C:\Program Files\wamp\www\hani\login.php on line 16 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\wamp\www\hani\login.php:15) in C:\Program Files\wamp\www\hani\login.php on line 16 can you explain this error to me, thanx.
  10. hi, im new at PHP but im a fast learner, really, do im looking for a tutorial to shoe me how to make a simple log in page where it confirms its username and password from a table in a database, then when permitted to login it goes to a page where it outputs all the registered users i have in another table, in this page i want to set every user as i want either ordinary user or administrator where only administrators have the permission to login in the login page, well i made a code for this but its not working as i hope, i told i need to use session function which i dont know, so if u can help me with any tutorial ill appreciate it, and if u want to see my code ill post it, maybe u can understand more about what i want, thanks
  11. HAN!

    objection

    im using a value of input box of a form in a php array, how i can do this? <?PHP include"connection.php"; $query="SELECT * FROM registration"; $result=mysql_query($query); $num=mysql_num_rows($result); for($i=0;$i<$num;$i++) { if($_POST['type'][$i]=='a') //this is where i get it from the form: type. { $first=mysql_result($result,$i,"First Name"); $query1="INSERT INTO administrator VALUES ('','$first')"; mysql_query($query1); } }
  12. HAN!

    objection

    i really dont know what is the use of this forum, i have posted my simple question from half an hour and i didnt get any answer yet, well i dont understand how this is a help forum. i just want to know how to use arrays in forms.
  13. HAN!

    arrays

    how i can declare array in a form, i need to set an radio input box in the form as an array for later use. thanxs
  14. i want to use $_POST in while loop, for example like: $i++; while($i<$num) { $first=mysql_result($result,$i,"First Name"); $copy=$_POST['usertype']; } so how i can put the $i in $_post like i did in mysql_result. thanks for ur help.
  15. it just seem that the variables are not transferring from php into javascript, so can u take a look and see if i have somthing missing thank u; <?PHP $user='hani'; $pass='annd'; ?> <script language="JavaScript"> <!-- function validate(form) { var u=<?PHP echo '$user'; ?> var p=<?PHP echo '$pass'; ?> if (form.username.value!=u) ) { alert("Please enter the correct username"); form.username.focus(); return false; } if(form.password.value!=p) { alert("Please enter the correct password"); form.password.focus(); return false; } } //--> </script> </head>
  16. do u know the alert box in javascript? when u write alert("somthing"); well i need that in php what is the alternative function for that in php? thanxs.
  17. well thanks for these notes but i tried them and nothing worked can u take a look at my code to see if im missing somthing plz, thanks <?PHP $user='hani'; $pass='annd'; ?> <script language="JavaScript"> <!-- function validate(form) { var u = "<?php echo str_replace("\"", "\\\"", $user);?>"; var p = "<?php echo str_replace("\"", "\\\"", $pass);?>"; if (form.username.value!=u) ) { alert("Please enter the correct username"); form.username.focus(); return false; } if(form.password.value!=p) { alert("Please enter the correct password"); form.password.focus(); return false; } } //--> </script> </head>
  18. how to use php variables in javascript, i want to transfer php variables into javascript ones and then use them in javascript, thanks for any help.
  19. how to use php variables in javascript, i need the way to transfer php variables into javascript ones and use them in javascript, thanx for any help.
  20. well that was a lot of help thanks
  21. how to ask the user for entering a username and password to verify if he is administrative or user for permitting him to continue? Thanks
  22. HAN!

    mailing

    thanks for the tip there is some improvement but still im getting this error Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 <hani_alyassir@hotmail.com>... Relaying denied. IP name lookup failed [212.28.253.30] in C:\Program Files\wamp\www\hani\insert.php on line 62 well do i have to change somthing to make it work?
  23. HAN!

    mailing

    im using the mail() function but a smtp error is getting to me, how i can change the smtp configiration and how i know what to chnge to? thanx
  24. here is the code im using: <form name="insert" action="insert.php" method="post"> <table> <tr><td>First Name:</td><td><input type="text" name="first" /></td></tr> <tr><td>Midle Name:</td><td><input type="text" name="middle" /></td></tr> <tr><td>Familly Name:</td><td><input type="text" name="family" /></td></tr> <tr><td>Adress:</td><td><input type="text" name="adress" /></td></tr> <tr><td>Describe yourself:</td><td><textarea name="description"></textarea></td></tr> <tr><td>E-mail:</td><td><input type="text" name="Email" size="26" /> <input type="button" onclick="CheckEmail()></td></tr> <script language="javascript"> function CheckEmail() { email = document.insert.Email.value AtPos = email.indexOf("@") StopPos = email.lastIndexOf(".") Message = "" if (email == "") { Message = "Not a valid Email address" + "\n" } if (AtPos == -1 || StopPos == -1) { Message = "Not a valid email address" } if (StopPos < AtPos) { Message = "Not a valid email address" } if (StopPos - AtPos == 1) { Message = "Not a valid email address" } return message </script> <tr><td><input type="submit" /></td></tr> </table> </form> i will appreciate any comments.
  25. well can javascript work with apache or is it aproblem? coz it is not working with me, no errors but no results too.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.