klaroen
Members-
Posts
34 -
Joined
-
Last visited
Never
Everything posted by klaroen
-
Oh, man I know somebody who had this problem to, but.... what was wrong again?? don't remember :(
-
I think you just need to do a few queries...
-
can you give the script you have for now...
-
yeah, that I know :p... I'll give another example: In a online game every player has his troops and has his attack power and defence power. Now, if I select the defence from the player that is logged in with query can I get the rank of his defence with a function? So his defence is like 5009 and there is only one player better with 6582 and a lot players are lower... Now, can I ask my database to count out for me that he's defence is the second highest? Or for other players how high their defence is (counted in places)... (get it?)
-
Why do you need a flash form, just make it php...
-
Well, you have the file right, then you change your username and password in that file itself: The " $realUser = ""; // what you want your user name to be $realPass = ""; // what you want your password to be. " part. Then if you want to secure a page put this at the top of the page: include "config.php"; authUser(); That's all
-
Imagine: I have a list of products and they all have their price. [code] <?php $player=$_SESSION['player']; $userstats="SELECT * from koc_products where username='$player'"; $userstats2=mysql_query($userstats) or die("Error while connecting to database! Please report this to an admin!"); $stat=mysql_fetch_array($userstats2); $ranking=[b]thecodeineed[/b]($stat[price]); print(" The product is our [b]?[/b] most expansive product!"); [/code] So as you see the code I need should tell me how muchst he is in the list of most expensive products... Is that understandable? (ps: rank is the number of how high he is ( how muschest)(is that spelled like that?? )
-
Oke this is the request: Is there a query function or code to do this: I have a database, and there are kind of diffrent number in it: 500 , 360 , 578, 9978, 7589, 125, 154, etc... Now when I select one of those, can I ask with a code with place he has from the top? So: I select the number 578 for example, can it tell me what 'rank' it has? so it should be 3th... Is there a code for that?
-
man, I really don't understand how to install that! Can somebidy, PLEASE, tell me how to install it in a few staps
-
but where do I install it or download it or whatever??
-
well, where do I get that? And it's only me who needs this right. People who visit my website don't he
-
<?php include("pagename.php"); ?> Then you can use the varibles from your php file
-
It doesn't work: it doesn't show the image... Do I need that GD2 library maybe??...
-
mh, looks good... but what is that GD2 library ???
-
Does anybody know a good script/tutorial for Image Vertification that realy works!! Or you could always deliver me a working one :p But I've search a lot and their was always something good wrong about them... thanks, klaroen
-
you could always use If-Else stucture... If(mail(.......)) { It worker! } else{ Bad luck } Although this doesn't check if the email excists. But that's bad luck for the user then he :D
-
don't realy understand the request :p but: shouldn't it be $checkbox['field'] and $checkbox['going'] with the '' signs? I guess so...
-
oke I have some things: - try to use the same signs: one time you use "" for your content second time '' - You don't need to place a point ( . ) when inserting values! example: $query=mysql_query("INSERT into users(username,password,email) values('$RegName','$RegPass','$RegMail')");
-
oke, first: this isn't such a big script but I'm not going to make it for you! Let's start: As first you need a database, in this database you put 'id, name, link, in, out' Then you make the main page, here you select the database stuff and use the 'while' thing to make a list of all the referers. You sort them on links "hits in-out" (that's the credit they have, so they can be in min...). Then in the while you pute their name with a link around it. This link must be [a href=\"http://www.yoursite.com/out.php?id=$id\" target=\"_blank\"]http://www.yoursite.com/out.php?id=$id[/a]. (The out page comes later) Then ofcource the referers must be able to make hits in: You give them a link: [a href=\"http://www.yoursite.com/in.php?id=theirid\" target=\"_blank\"]http://www.yoursite.com/in.php?id=theirid[/a] Then you make the in.php page: You can select their id from the url so you select his data from your database. Then you say update hits in + 1, oke :) If you want that they can only click once per IP you must put this in the If-Else structure... Then the out.php page. You select de data from the database with the id in the link. Then you update the out hits + 1. And you riderect the visitor to the url of the referer!! So that was all :p If you have questions you may ask them :D (if you are just a noob in php, I could understand that ... ) Greets, klaroen
-
isn't that a wierd query their at the start??! I don't know if that as allowed..
-
you haven't got a '{' thing after your second while...
-
not totally :p in login your 3th session register is spelled wrong :p :D phhh, f** it still not working!! Why not!! Well, let's try again: ____________________________________________ menu.php (the login form) --------------------------------- [code] <form action="login.php" method="post"> <table align="center" class="small" style="padding: 0px 0px 5px 0px;" width="130"> <tr> <td align="center"><font color="black">Username:</font></td> </tr> <tr> <td align="center"><input class="login_input" type="text" name="LoginNaam" value=""></td> </tr> <tr> <td align="center"><font color="black">Email:</font></td> </tr> <tr> <td align="center"><input class="login_input" type="text" name="LoginMail" value=""></td> </tr> <tr> <td align="center"><font color="black">Password:</font></td> </tr> <tr> <td align="center"><input class="login_input" type="password" name="LoginPassword"></td> </tr> <tr> <td align="center" style="padding-top: 5px;"><input type="hidden" name="Submit" value="1"><input class="login_input" type="submit" value="Login" style="width: 50px;"></td> </tr> </table> </form> [/code] ------------------------------------- ------------------------------------- login.php -------------- [code] <?php session_start(); // connect to database. $DBHost = "localhost"; $DBLogin = "klaroen_data"; $DBPassword = "******"; $DBDatabase = "klaroen_data"; mysql_connect("$DBHost", "$DBLogin", "$DBPassword"); @mysql_select_db("$DBDatabase"); // if theres a post submit. if ($_POST(['Submit'] ) { $Query = mysql_query("SELECT * FROM koc_users WHERE username = '$LoginNaam' AND password = '$LoginPassword' AND email = '$LoginMail'"); $Results = mysql_num_rows($Query); // if user exists goto base.php if ($Results == '1') { session_register('email'); session_register('name'); session_register('password'); header ("Location: base.php"); }else{ header ("Location: wronglogin.php"); } } ?> [/code] --------------------------- --------------------------- base.php ------------- [code] <?php session_start(); if ((! $_SESSION['username'] )&& (! $_SESSION['password'])) { ?> <!-- *************** --> <!-- Check the login --> <!-- And else... --> <!-- *************** --> <?php include("connect.php"); ?> <?php $query = "SELECT * FROM koc_users WHERE username = '".$_SESSION['username']."' and password='".$_SESSION['password']."' "; $st=mysql_query($query); while($row=mysql_fetch_assoc($st)){ ?> <table width="100%"> <tr> <td width="50%" valign="top" style="padding-right: 25px;"> <table class="table_lines" width="100%" cellspacing="0" cellpadding="6" border="0"> <tr> <th colspan="2" align="center">User Info</th> </tr> <tr> <td><b>Name</b> </td> <td><? echo $row['username']; ?></td> </tr> </table> </td> </tr> </table> <? } ?> <?php //if not logged in goto correct page. }else{ header("location: mustlogin.php "); } ?> [/code] ------------------------------------- If we can't solve this in the next 30 min, I think I'll quite for this evening (22:26 here) Fingers Crosses! :p klaroen
-
here is something: You don't need a form I think... just a button than does the onlclick thing: <input type='button' value='EDIT' onClick='editPopup()'>
-
lol , (thanks for the help) , but here is the next error: Parse error: syntax error, unexpected '[', expecting ')' in /home/klaroen/domains/kingsofwar.be/public_html/kocclone/login.php on line 18 and line 18 says: if ($_POST(['submit'] ) { so....
-
isn't it "while($row=mysql_fetch_assoc($st)){" in stat of "while($row=mysql_fetch_assoc($st){ ??? AND if ((! $_SESSION['username'] )&& ($_SESSION['password'])) { in stat of if ((! $_SESSION['username'] )&& $_SESSION['password'])) { ???