Jump to content

Kristian_C

Members
  • Posts

    246
  • Joined

  • Last visited

Everything posted by Kristian_C

  1. okay, ill ask ->Kristian_C.
  2. Kristian_C

    Possible?

    The plan was to do like a msn thing, but in this case it seems to be harder since i really dont know so much about php yet as im still a neewbie, but maybe ill just do as you say and make it possible for every one to see who logs on. just have a little list over the 5last logins up in the corner of page or something like that.... if i then use your code, does it register the session it self? or must i do something? in case of that, what must i do?.And will it empty the session itself when a session is beeing emtpyed? in a easyer why, will it self delete from the db?..->Kristian_C.
  3. Hmm, i did post that one : also had this one :<link rel="shortcut icon" href="frontstuff/favicon.ico" type="image/x-icon">so must be another problem, but well ill try again
  4. Server info : Operating system Linux Kernel version 2.6.9-42.0.3.ELsmp Machine Type i686 Apache version 1.3.36 (Unix) PERL version 5.8.7 PHP version 4.4.4 MySQL version 4.1.21-standard hope that helps.->Kristian_C.
  5. Hey guys/girls, have a problem that i cant figure out,<link rel="icon" href="frontstuff/favicon.ico" type="image/x-icon">tried that and it dident work also tried :<link rel="icon" href="frontstuff/favicon.ico" type="image/jpg">and i tried with the whole link on both, but nothing works?also had this one :<link rel="shortcut icon" href="frontstuff/favicon.ico" type="image/x-icon">but no, anyone knows what can be the problem?->Kristian_C
  6. Kristian_C

    Possible?

    Thanks, but how do i display etc an echo over at the other users screen if you understand what i meen?..The thing is how to display that a session starts, and i need to display at 1-20 users screen...Since the max limit of contacts are 20.if you can help me out with how to select from those sessions, then return it somehow with JS.Just need to understand how to return it actually, js i think i can sort out myself.in case you need some info to help :session name : brukernavn.contact table : kontakter.select from contacts will be :select * from kontakter where brukernavn=$brukernavn contacts = kontakt.....Hope you or someone else can help me figure this out .->Kristian_C.
  7. The main problem is just to add php to the error page. tried normal but seems like it dont work, so i dont think it is possible to use php.->Kristian_C
  8. Thanks ...->Kristian_C.
  9. Yeah i agree with ste, dident really understand what you needed help with actually.->Kristian_C.
  10. Image maps just use html.etc :<img src="something" alt="" width="346" height="167" border="0" usemap="#test"><map name="test"> <area shape="circle" coords="87,86,43" href="#something" alt="Hey"> <area shape="circle" coords="240,129,23" href="#something" alt="Hey again"></map>->Kristian_C.
  11. Hey :)Is there a way to redirect, etc an include error? like :Warning: main(thatsite.php) [function.main]: failed to open stream: No such file or directory in ++++is there a way?->Kristian_C.
  12. Kristian_C

    Possible?

    i guess the page will be changed 3-4 times ++ in a minute.->Kristian_C.
  13. Kristian_C

    Possible?

    I want my users to be able to see when their friends comes online. easy and simple... what i can do is to just have a system so the users can get a message when their friends logs on, but thats not something i want i want something more fanzy, and i know it is possible somehow..->Kristian_C.
  14. ERROR 404 and stuff like that, like if you open a link, and the site is down, you see : cant find server ++ those files are saved as .shtml .. i know it is possible to request IP/Browser/url +++ in those but then it must be like this : <!--#echo var="HTTP_REFERER" --><!--#echo var="REMOTE_ADDR" --><!--#echo var="REQUEST_URI" --> and i want to have like etc: <?$er=mysql_query("SELECT * FROM errors WHERE errortype='404'");$re=mysql_fetch_object($er);echo"$re->main";?><br><br><?echo"$re->errortext"?><br><br><br><br><br><br><?echo"$re->foot";?> Just dont know if im allowed to use regular php in there becouse i really dont know how .shtml operates..got any suggestions?.->Kristian_C.
  15. Kristian_C

    Possible?

    Yeah, i can do the popup, and time it, was reading about it for a few days ago, but the problem is how to display the popup at the other users screen..like how to get the session thing, may just use sql/php tho, if it aint no other ways, but yeah.->Kristian_C.
  16. Kristian_C

    Possible?

    hehe, i dont want to see the user online, or i want but thats not a problem, i need popup window that closes after 3seconds or something when a user login to the site...I can use sql/php to do it but that whould take so long time with my skills ...chould update a collum in the user table then make it go to another status after some seconds then show the popup while the time counts down... But i really dont have an idea of how to display the popup with the actual username ++ on the screen to the other guy..So thats the problem.. ->Kristian_C.
  17. http://w3schools.com/php/php_cookies.asptry to figure out that, sets time and stuff, i dont know how to use cookies so cant help you there..->Kristian_C.
  18. If thats what you want you either need to make a user system, or use cookies.. ->Kristian_C,
  19. Every thing depends on how long you are out of the site, if you login to a site then close the browser and open after 2minutes, then you should be able to use this code to get back in dont know if it is possible to have it longer, without useing cookies.well if you want to test : if(isset($_SESSION['username'])){header("Location: home.php");exit();} but if you want to have it last even longer i dont know...->Kristian_C.
  20. use :session_start();$username=$_SESSION['username'];on top of every page, then have a link to a php page like functions.php and have this code there :<?function erhanlogin(){if (empty($_SESSION['username'])){echo "<script LANGUAGE='JavaScript'>window.location='index.php';</script>";exit();}}erhanlogin();?>only include on the files where you need to be logged in tho.->Kristian_C.
  21. Hmm, i just wrote the code you can use, i just hate writing html you will need to create a register script tho...but login script is there.->Kristian_C.
  22. Thanks ill remember that ..hehe, it was just a example my scripts aint like that at all actually ->Kristian_C.
  23. Aha Thats what i was looking for Thanks.->Kristian_C.
  24. so etc :if($_POST['login'] && $_POST['username'] && $_POST['password']){$username=$_POST['username'];$password=$_POST['password'];if(strlen($username =< 5) || strlen($username > 15)){echo"Invalid : Username";exit();}if(ereg('[^0-9^A-Za-z]', $username)){echo"Invalid : Username";exit();}$check=mysql_query("SELECT * FROM users WHERE username='$username'");$checkuser=mysql_num_rows($check);$checkpass=mysql_fetch_object($check);if($checkuser == 0){echo"No user with that name in the db";exit();}if($checkpass->password != $password){echo"Invalid : Password";exit();}if(ereg('[^0-9^A-Za-z]', $password)){echo"Invalid : Password";exit();}else{ ------That whould then be safe? ->Kristian_C.
  25. Kristian_C

    .shtml editing.

    Hey, im verry tired of getting so ugly shtml errors when etc page is offline ++and i wondered, is it possible to insert direct sql/php/html maybe js? is this possible or must it be runned another way then shtml files, if thats the case, how to do it?->Kristian_C.
×
×
  • Create New...