Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dubbeldam

  • Rank
  1. I see. Do you have an example of how you want it to look like?
  2. Hm that's strange, normally the images and text shouldn't become smaller or bigger upon changing the browsers height and width... can I see the website?
  3. Ah man, I figured it out just moments after I posted the above comment! I had set it to VARCHAR, latin1_swedish_ci while it had to be INT instead of VARCHAR haha sorryyyEDIT:Wait, almost! When I put 99 as health, and add 3 it goes to 102 instead of 100!
  4. Ah I see about using the IF() function, thanks for clearing that up. And yes healthmax remains 100... its weird,When I put health on 1 it goes to 4, from 4 it goes to hundredWhen I put health on 2 it goes to 100When I put health on 3 it goes to 100When I put health on 4 it goes to 100When I put health on 5 it goes to 100When I put health on 6 it goes to 100....7, 8, 9 also 100...I tried 10 again, it goes to 13, then to 100...I tried it all the way to 17... and from 11-17 all go to 100 again. So only 1 and 10 seem to be working? 20 also didn't work correctly.
  5. Hm it's getting somewhere.... When I put the health on 10/100 it goes to 13... but if i do it again it goes from 13 to 100? mysql_query("UPDATE members SET health = IF(health < healthmax, health + 3, IF(health > healthmax, healthmax, health))")or die(mysql_error()); Shouldnt the first IF() be closed before the other IF?
  6. pff more problems If I add mysql_query("UPDATE members SET health=health+3"); It works! But every user has a maxhealth aswell, which cannot be exceeded. So I need to use an IF value, what I tried (among many other things) if (mysql_query("SELECT health FROM members") < mysql_query("SELECT healthmax FROM members") ) {mysql_query("UPDATE members SET health=health+3");}if (mysql_query("SELECT health FROM members") > mysql_query("SELECT healthmax FROM members") ) {mysql_query("UPDATE members SET health=healthmax");} But that doesn't work Does anyone have any ideas?
  7. Err is correct,, i'll give u a little bit more detailed version.So you have a folder with all your pages, now to make it organized and easy to find most people make another folder (called images or pictures). There is where they put all the images. Now they can put images on their site this way: <img src='images/image1.jpg'>Now when you have a host on the web for your website you can just upload the entire folder and keep the same code!
  8. It works! I indeed had to do the include instead of file And thanks for the tip about the command line. I'll have to check that out
  9. I did that once with pictures, not really the standard buttons. This is the code I used for pictures: <a href="index.php" onmouseover="SetImage('Home','images/homemouseover2.jpg');return false;" onmouseout="SetImage('Home','images/home2.jpg');return false;"><img src="images/home2.jpg" id="Home" alt="" border="0" style="width:91px;height:39px;"></a> you can replace index.php by any link you like,the first setimage is the image I used when you have your mouse over the imshr,the next setimage is the image I used when you get your mouse out over the image,The img src is basic
  10. Try putting them in a table! <table border="0"> <tr><td>Code for widget 1</td><td>Code for widget 2</td><td>code for widget 3</td></tr><tr><td>code for widget 4</td><td>code fro widget 5</td><td>code for widget 6</td></tr></table> You can set the border to 1 or 2 instead of 0 to see how it looks! Good luck
  11. Config.php isn't that special... <?phpdefine('DB_HOST', 'localhost'); define('DB_USER', 'myname'); define('DB_PASSWORD', 'password'); define('DB_DATABASE', 'mydatabase');?> As far as the code goes with where email is email, pretty much same result. Still adds the moneyhourly to money so don't see any problems with that.
  12. Thank you very much for your help and I really don't mind if you forget. I appreciate any help available.I did already do the UPDATE members SET money etc. etc..... I think where I can be wrong is the log-in, as it works as link through the website but not as stand alone. This is what I have.... (Don't forget I do this for practice, and am pretty much a newbie so a lot may look messy) <?php //Start sessionsession_start(); //Include database connection detailsrequire_once('config.php'); //Array to store validation errors$errmsg_arr = array(); //Validation error flag$errflag = false; //Con
  13. Ok I am doing something wrong, but can't figure out what. If I add a button on the page called 'AddMoney', and refer it to 'addmoney-exec.php' it works. It adds the money..... Now I want to have it automatically every hour. Fine, this is what I did:executecron.php <?php$data = file("C:/xampp/htdocs/mafiawarstest/moneyadd-exec.php");?> cron.bat C:\xampp\PHP\PHP.exe C:\xampp\htdocs\mafiawarstest\executecron.php On windows scheduled tasks-New basistask-Name: Addmoney-Trigger: daily / 14:00 (for example)-Action: Open program - program/script: cron.bat Now I see that command prompt open
  14. I indeed just found out of the use of a cron job. So time for RESEARCH! Me gusta
  • Create New...