Jump to content
xisto Community

Feelay

Members
  • Content Count

    275
  • Joined

  • Last visited

Everything posted by Feelay

  1. Hey! I've tryed to install linux without a cd (as they said on the website).. But I did'nt understand it so good =/ Can anyone please tell me how I can install linux without a CD? Any version.. The only thing I need is a fast one (faster than windows).. I am completly new (never tried it before) and would want to learn Linux. But thats not easy, if I don't know hoiw to install it Thanks //Feelay
  2. Feelay

    Firefox Problems..

    so there is not any way to fix it?
  3. Feelay

    Firefox Problems..

    thats what I mean. it should not look like that =( any idea how I can fix it?
  4. Hey! I am having a small problem in firefox on my website. When the user is logged out, the website looks wacked :S But in Internet Explorer it works just fine =( I can't exactly explain what the fault is, because I don't know it myself, but can you please try to look? Here it is.. Sorry if this is wrong forum, but I thougt that it had something with the Internet to do.
  5. Thanks you. Both Jordan and Pyost :PBut I think I will choose pyosts way, because, when i try to type in my password in the cmd, nothing happens, and when i press enter, it says I am typing in the wrong password.anyway. Thanks //FeelayEdit: Or maybe I will use both I just saw yordans edit, and I can't extract a complete folder =/
  6. Hey!is it possible to upload lots of files fast, and to a specefic folder? I am sure you guys are going to tell me "use" the FTP tool.. But I have no idea how to use it =/
  7. Sorry. My fault. Try this code: <?phpinclude("style.css");include("config.php");// username and password sent from signup form$myusername=$_POST['myusername'];$myusername=mysql_real_escape_string($myusername);//I added this to make your script a little more safe$mypassword=$_POST['mypassword'];$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";$result=mysql_query($sql);// Mysql_num_row is counting table row$count=mysql_num_rows($result);// If result matched $myusername and $mypassword, table row must be 1 rowif($count==1){// Register $myusername, $mypassword and redirect to file "login_success.php"$_SESSION['login'] =$myusername; //I added "=$myusername, so that the session can recognize you"$_SESSION['views'] = $_POST['myusername'];header("location:login_success.php");}else {echo "Wrong Username or Password";}?> Try it. It Should Work. //Feelay
  8. very simple <?phpif(isset($_SESSION['login'])){echo "Welcome;) You are logged in";}else{echo "Welcome Guest! You are not logged in";}?> And you can ofc do it the other way too <?phpif(!isset($_SESSION['login'])){echo "Welcome Guest! You are not logged in";}else{echo "Welcome;) You are logged in!";}?> in the last one, if you look carefullt, you will see that I inserted a "!" before i wrote "isset". "!" = not wich means: in the first one, it would be:
  9. <?phpinclude("style.css");include("config.php");// username and password sent from signup form$myusername=$_POST['myusername'];$mypassword=$_POST['mypassword'];$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";$result=mysql_query($sql);// Mysql_num_row is counting table row$count=mysql_num_rows($result);// If result matched $myusername and $mypassword, table row must be 1 rowif($count==1){// Register $myusername, $mypassword and redirect to file "login_success.php"$_SESSION['login'];header("location:login_success.php");$_SESSION['views'] = $_POST['myusername'];}else {echo "Wrong Username or Password";}?> Try this. The part I changed was this: session_register(myusername);session_register(mypassword); I erased them, and put $_SESSION['login'] Instead. But now, you will have to change every place where you have: session_register(myusername);session_register(mypassword);into $_SESSION['login'];even in the login succes and so on. and in your logout.php you will have to change it to: <?phpsession_start();session_unset();session_destroy();?> This is the way I do it. It should work. Edit: Between.. You should change this in your login_succes.php. change from: if(!session_is_registered(myusername)){header("location:main_login.php");} to: if(!isset($_SESSION['login'])){header("location:main_login.php");} If think thats what you wanted or? if the user is not logged in, he will be redirected to main_login.php. if you want the difference, just remove the "!" before "isset". And you will have to write this "if(!isset($_SESSION['login'])){..." instead of "if(!session_is_registered(myusername)){..." in every file that you want to protect.
  10. I don't understand.. ;)did the code I gave you work, or didn't you try?
  11. You said this is your logout script: And I said that you should try to change it to this : <?session_start();session_unregister("mypassword");session_unregister("myusername");session_unset();session_destroy();?> But eggie. remember. as I told You.. I have NEVER ever used session_regiter and session_unregister, so I dont know if I am using session_unregister the right way.. Maybe it is: <?session_start();session_unregister($mypassword);session_unregister($myusername);session_unset();session_destroy();?>I don't know. try both.. but I know that the fault is from there.
  12. This is your code.. Look at this: This is were you have registered them. now in the logoutscript, you should unregister them.
  13. I think I know whats wrong. You have registered a session in a way I've never used. But i checked the php manual, and according to that one, you must unregister registered sessions. You can do that by typing something like this: session_unregister("myusername");You must include this code (and unregister mypassword), in the logout script. here is the link for the phpmanual: session_unregister php manual
  14. Look at this This will tell you how to make your website account work
  15. "(int)" don't work. I've tryed that before, and now I tryed it with your code.It is still showing value "0" where "$givexp" is.
  16. because the script says:If the user exp is more than 100, the user level should be changed to level 2 (etc.).. And that script runs everytime the user login. It would not work.
  17. Hey! I am trying to do a "Admin give EXP script". But I can't make it work. The value is not updating, but the update query is correct.( I think:P) I think the fault is here: $expcomp=$givexpp['exp'] += $givexp; The $givexp is the variable for the amount of Xp the admin wants to give. the $givexpp is the variable for the user info (in this case, the experince he already have). The datatype for the XP in the database is INT. So I have no idea if it can take data from a normal textfield. If you need to see all the code, here you go: <?phpsession_start();include "database.php";$givexpto= mysql_real_escape_string($_POST['givexpto']);$givexp= mysql_real_escape_string($_POST['givexp']);$queryxp =("SELECT * FROM characters WHERE user='$givexpto'")or die(mysql_error()); if(mysql_num_rows(mysql_query($queryxp)) == 1) { $givexpp = mysql_fetch_assoc(mysql_query($queryxp)); }else{ die("User Don't Excist. Please Go Back And Try Again");}$expcomp=$givexpp['exp'] += $givexp;mysql_query("UPDATE characters SET exp='$expcomp' WHERE user='$givexpto'");header("location:index.php");?>
  18. Oh. but my code was just an example.I just wanted to show, that if I wrote that code, it would give the user 5 skill points every time the page was loaded. but I want it to give the user 5 skill points, only the moment the user reach level 5 (for ex.).and between, I thougt of making a colum for the points, but the user will be able to "buy" health and strenght and stuff for theese points. so they (the points) will become 0 anyway =S
  19. hmm.. lets say I have 100 members. I think it would take a very long time to change the index.php?username=someuser to all the members or? can I write something else instead of "someuser"=? Maybe this would work? If I make a for loop, (or while or whatever) an let it show all the names as a link, were the "someuser will be replaced with the "someuser" value.. would that work?
  20. Hey! I know I am asking alot. But much is happening theese days. Sorry if I disturb with my questions. The thing I am trying to do is: Ex. If the user becomes level 2, he should get 5 skill points. I can't do this: if($userlevel=5){mysql_query("UPDATE user SET skillpoints =$points+5");}because then it would update everytime the code was loaded. I hope you understand what I am trying to do. If not, tell me and i'll try to explain better. Thanks //Feelay
  21. hmm. I still don't understand. How can I make a normal <a href blabla..>link</a>link into a $GET['..'] variable?
  22. Hey!I will try to make this as clear as possible.how can I make the following. I have a list, of all members on my site. If I press on a members name(link), I will come to his profile.To come to his profile, I need to get out some vaule from the database, but to get out some value from the database, I must tell the code, how it should know who the user is (hard to understand?).To do that, I must add a mysql_query in the code ( I think), like "SELECT user FROM dbname WHERE user=link".. This is just how I think it works. I know it is kinda wrong.. but I don't know how much. Can anyone please help me on the line ?(Sorry if you didn't understand..)
  23. I understand how theese stuff works now (the time() function and stuff).But is it possible to make it update without a user being online =? Or must the script be loaded by a user, to run?
  24. Hey! I just wanted to know, if I want to make a PM system, should I store the PMs in a database or how should I do it? And if I should store them in a database, how do I do that. Because I have acctually no idea, if I should create 50 tables to store 50 messages (And a little OT question[instead of creating a new topic]).How can i change the timestamp [time()] into real date?
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.