Jump to content

Monk3h

Members
  • Posts

    223
  • Joined

  • Last visited

    Never

Everything posted by Monk3h

  1. Any ideas? This is part of my layout change script Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/monk3h/public_html/portfolio/change_layout.php on line 15 <?php if (!$HTTP_SERVER_VARS["HTTP_REFERER"]) $HTTP_SERVER_VARS["HTTP_REFERER"] = "./index.php"; if (!$HTTP_GET_VARS["v"]) exit ("You have not selected a layout version!"); if (!file_exists("./header".$HTTP_GET_VARS["v"].".php")) exit ("The header for that layout version does not exists, please contact the webmaster with the subject 'header".$HTTP_GET_VARS["v"].".php not exist!"); if (!file_exists("./footer".$HTTP_GET_VARS["v"].".php")) exit ("The footer for that layout version does not exists, please contact the webmaster with the subject 'footer".$HTTP_GET_VARS["v"].".php not exist!""); setCookie ("layout", $HTTP_GET_VARS['v'], time()+(365*86400)); echo ""; ?>
  2. Thankyou! Works now, i thought they were double qoutes. o.O
  3. I am trying to create a script to alow users to use multiple layouts on my site and i have hit an error. =/# Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/monk3h/public_html/portfolio/header.php on line 8 The script is all below, line 8 is line 8 in the script. <?php $default_layout = “01”;if (!$HTTP_COOKIE_VARS[‘layout’]) { $include_layout = $default_layout; } else { $include_layout = $HTTP_COOKIE_VARS[‘layout’]; } if (!file_exists(“./header”.$include_layout.”.php”)) { echo “Could not include header”; } else { include_once (“./header”.$include_layout.”.php”); } ?>
  4. I have created a script to bring back some info from my database in the form of a drop down menu. i did this using an array. <option value='$ability[id]'>$ability[name]</option> $ability[name] obviously prints the name of each ability into a drop down menu (i have removed to array to make this quicker). the value is the abilitys ID, this is what i want to carry forward. there is a submit button after the drop down menu. what i want to do is once the ability name is selected i would like to be able to print the ability id. how would i do this out of the arrey? Thanks in advance.
  5. do you have a .htaccess file for allowing globals? if not and you have them enables some use an alternate method, if this is the case then .htaccess will be disabled. Such as php.ini
  6. <?php $IPsel = mysql_query("select * from players WHERE 'IP' = 'IP'"); while ($multi = mysql_fetch_array($IPsel)) { Print "$multi[user] ($multi[id])<br><br>"; } ?> something like that, but I want it to check for players with the same IP. that just lists all the players where there IP = there IP which is all of them ofc.. =/
  7. I am trying to create an multi checking script for my game. What i need to do is check the field IP in my players table and if the sql brings back multiple players with the same IP (2 or more) i would like to be alerted. How would do i do the SQL part to this?
  8. How would i bring back data from an sql table and have it display it in a drop down menu?
  9. I am trying to create a way to buy units on my game, i have created an array to bring the units info from the database and displayed it in a table. My problem is when it comes to actually buying some units. I have a text box appearing next to each unit which will be used by a player to enter the amount of each unit they wish to buy. How would i define the text boxes to each unit in the array so that when they hit BUY the right amount of each unit is purchased. Thanks in Advance, Monk3h.
  10. Wouldnt storing the login details in a cookie be more secure? Id just make sure you exclude any characters that can be used to SQL inject, or print the details first. I would also use sleep() to protect against brute force. Md5 as an encrypt. Just shooting ideas here.
  11. An autherisation error will be somthing to do with the permisions and not a PHP syntax error.
  12. By multiple i mean loats of different types. each doing different amounts of damage and with different ammounts of health.
  13. the problem is, there will be multiple units. So how would i work out how many of each units die? also how mould i ensure the weaker ones die more than the stronger ones? o.O
  14. I am currently working on a text based rpg and I need some help with the battle system. Each unit has dmg points and health points. Each player can have many different units. The part im stuck with is how would I create a script that does damage across a range of units. Eg, say I send 10 Ninjas to attack 10 rifleman, the ninjas would attack first and do there dmg, how would I create a script to calculate how many rifleman have been killed? Any ideas?
  15. Parse error: syntax error, unexpected T_VARIABLE
  16. I am the owner of a text based RPG that I created my self. I have a databse for all the players info and a field for the email address. How would I go about creating something in PHP to send an email to every email in the players database? Im asking here first as I don’t want every one to get spammed by mails due to my errors. Thanks in advance, Jay.
  17. Thank you, also the second one does not work. (PHP) Any ideas? is the Syntax correct?
  18. is this correct? Im trying to use AND but i have no idea how to include it. $check = mysql_fetch_array(mysql_query("SELECT * FROM `alphaground` WHERE `x` = '$x' & `y` = '$y'")); elseif ($check['x'] == $stat['x'] & $check['y'] == $stat['y'])
  19. I have solved the problem using a URL redirect script but im hoping some one has a more practical solution. :/
  20. I am currently working on a new RPG. My problem is that my pages seem to update 1 stage behind the database. When I click a link to change something in the game the effect does not appear until 1 click after. For example, my script will pick up that a player is on a portal location, on doing so a link appears allowing that player to enter the portal. But once the link is clicked for some reason that message still appears! The database is correct and shows the player as in the portal, its not until the link is clicked a second time that the link disappears. Any ideas? I am using $action on links. PHP snippet. if ($stat[location] == '1'){ Print "<br><br>You are currently on a Portal location within the AlphaGrounds, clicking here will allow you to move from this location thru the Portal, this will take an undetermined amount of time.<br><br><center><a href=alphaground.php?action=portal>Click here</a> to enter the Portal.</center>"; } if ($action == portal){ mysql_query("update players set location='0'where id=$stat[id]"); } if ($action == portalback){ mysql_query("update players set location='1'where id=$stat[id]"); }
  21. For the record, the correct command is.. /usr/local/bin/php /home/<user>/crons/ Thanks for the help. ???
  22. Getting the database user/pass/name for these forums would be very difficult and most probably illegal if the owner doesn’t just hand them over (which wouldn’t be very smart). I Think you got a bit confused.
×
×
  • Create New...

Important Information

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.