
DEVILofDARKNESS
Members-
Posts
502 -
Joined
-
Last visited
Never
About DEVILofDARKNESS
- Birthday 05/27/1993
Contact Methods
- MSN
-
Website URL
http://www.ninv.be
Profile Information
-
Gender
Male
-
Location
Belgium
DEVILofDARKNESS's Achievements

Regular Member (3/5)
0
Reputation
-
In my browser everything looks fine; but in case you want to be sure, you will need to use css (maybe you already are) w3schools overflow
-
try to declare the session_cache_limiter before declaring session_start() P.S.: use php/code tags
-
First: Please use [ php ] or [ code ] tags. Second: If the balance.php includes a function todo the sql query, you can simply call the function and pass the variable to it do_query($memberid); Although I don't know from where the $memberid is comming..
-
what you all think of site GAme?
DEVILofDARKNESS replied to DarrenReeder's topic in Website Critique
I have a couple of remarks: 1. If you insert a invalid username you get a not that beautifull looking page 2. You show weither the username or the password is wrong, hackers can make easy use of this. You should always show: Incorrect username or password 3. There is nowhere an introduction page that gives you info about the game. A user will not sign up quickly if he does not know what the game is about -
Ruby on Rails - Python Django (- Php)
DEVILofDARKNESS replied to DEVILofDARKNESS's topic in Miscellaneous
Okay but I don't really think it is good to compare php with python and ruby cause the last 2 are not web-based programming languages but system-based ? But my main thread is actually what you think about rails and django.. -
What do you guys think about ROR and Django? And are they better (in some points) then php?
-
Can you give the full error please? Is the for loop meant to be in the TKAutomaton Class? If so then it isn't indented right.
-
If you expect that 2.47 billion people will visit your site: No you could make this int shorter but it will not affect the speed that much I think And just because I'm curious: What will idle do?
-
You will have todo a query like: $query = "SELECT * FROM messages WHERE userid='$userid'"; $res = mysql_query($query); while($arr = mysql_fetch_array($res)){ print $arr['title'] . "\n"; } <= will give you a list with all message titles is this what you meant?
-
I have this table(building_lvl): lvl | building_id | region_id And I want to get the region_id for which building_id=3 has lvl 2 and building_id=2 has lvl 5 Help with Code Tags PHP Syntax (Toggle Plain Text) SELECT * FROM building_lvl INNER JOIN regions ON regions.region_id = building_lvl.region_id WHERE ((building_lvl.building_id='3') && (building_lvl.lvl > 1)) && ((building_lvl.building_id='2') && (building_lvl.lvl > 4)) && (regions.nation_id = '17'); but this gives an empty set, why? (and I'm sure there is a region_id which has this conditions)
-
some use $_SESSION, some use $_COOKIE (I use $_SESSION) session_start() //has to be the first line of your php code if you need sessions $_SESSION['example'] = 'this is an example'; // asigns the string to a session print $_SESSION['example']; // prints This is an example $example = $_SESSION['example']; //asigns the value of the session to a variable
-
[SOLVED] php function inside javascript.
DEVILofDARKNESS replied to DEVILofDARKNESS's topic in Javascript Help
Woohoow I solved it with: self.location="functions.php?func=updateart"; -
[SOLVED] php function inside javascript.
DEVILofDARKNESS replied to DEVILofDARKNESS's topic in Javascript Help
I don't want to go the ajax way because I don't know anything of it, so here a last try: function countdown() { num--; document.getElementById('countdown_ele').innerHTML = num; if(num < 1){ clearTimeout(timer); self.location="functions.php?func=updateart"; } } if($_GET['func']=='updateart'){ session_start(); require './checkuserid.php'; $qry = "SELECT * FROM countdown WHERE (nation_id='$nationid') && (weapbuild='weap')"; $res = mysql_query($qry); $ass = mysql_fetch_assoc($res); $qury = "SELECT ammount FROM region_weapons WHERE (weapon_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $resu = mysql_query($qury); if(mysql_num_rows($resu) > 0){ $query2 = "UPDATE region_weapons SET ammount = 'ammount + " . $ass['extra'] . "' WHERE (weapon_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $res = mysql_query($query2); }else{ $query3 = "INSERT INTO region_weapons('region_id','weapon_id','ammount') VALUES ('" . $ass['region_id'] . "','" . $ass['wb_id'] . "','" . $ass['extra'] . "')"; $res = mysql_query($query3); } $query4 = "DELETE FROM countdown WHERE (wb_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $result = mysql_query($query4); header('location:./nationoverview.php'); } The php is loaded when the timer reaches zero and the script returns to nationoverview because of the header on the last line. No is there one problem, none of the query's is done:f -
[SOLVED] php function inside javascript.
DEVILofDARKNESS replied to DEVILofDARKNESS's topic in Javascript Help
I found out, that firebug actually gave me an error: the two brackets: () are not in the javascript but were shown in red by firebug, I can though open functions.php?func=updateart manually... document.getElementById('countdown_ele').innerHTML = 'FINISHED'; var head = document.getElementsByTagName('head').item(0); var script = document.createElement('script'); script.setAttribute( 'type', 'text/javascript' ); script.setAttribute( 'src', './functions.php?func=updateart' ); head.insertBefore( script, head.firstChild ); So what is the problem? -
[SOLVED] php function inside javascript.
DEVILofDARKNESS replied to DEVILofDARKNESS's topic in Javascript Help
Okay I solved it without any ajax I did with javascript: document.getElementById('countdown_ele').innerHTML = 'FINISHED'; var head = document.getElementsByTagName('head').item(0); var script = document.createElement('script'); script.setAttribute( 'type', 'text/javascript' ); script.setAttribute( 'src', './functions.php?func=updateart' ); head.insertBefore( script, head.firstChild ); I know it calls the functions.php,(saw it in firebug) but somehow it just does the delete query and not the insert or update queries :f what have I done wrong? if($_GET['func']=='updateart'){ $qry = "SELECT * FROM countdown WHERE (nation_id='$nationid') && (weapbuild='weap')"; $res = mysql_query($qry); $ass = mysql_fetch_assoc($res); $qury = "SELECT ammount FROM region_weapons WHERE (weapon_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $resu = mysql_query($qury); if(mysql_num_rows($resu) > 0){ $query2 = "UPDATE region_weapons SET ammount = 'ammount + " . $ass['extra'] . "' WHERE (weapon_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $res = mysql_query($query2); }else{ $query3 = "INSERT INTO region_weapons('region_id','weapon_id','ammount') VALUES ('" . $ass['region_id'] . "','" . $ass['wb_id'] . "','" . $ass['extra'] . "')"; $res = mysql_query($query3); } $query4 = "DELETE FROM countdown WHERE (wb_id='" . $ass['wb_id'] . "') && (region_id='" . $ass['region_id'] . "')"; $result = mysql_query($query4); }