Jump to content

Selacius

Members
  • Posts

    134
  • Joined

  • Last visited

About Selacius

  • Birthday 10/30/1985

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Sudbury, Ontario, Canada

Selacius's Achievements

Member

Member (2/7)

0

Reputation

  1. I am trying to figure out the best way to save my RPG object data in AS3. I would preferrably like it to be sent to a server and saved in a db, however I am struggling with how to send all of my data across to PHP. The objects are quite lengthy and have nested objects within them as well. Any suggestions would be greatly appreciated.
  2. I'd personally like to keep it on the same page if its possible. It would just make things much easier for me.
  3. I don't think its the code itself because it correctly displays the pop-up window, and withholds the text from being displayed until the proper selection is made. The code itself works exactly as I would like, but the problem is in the mysql_query updating the database regardless of the user's selection.
  4. With those changes, will it make it so that I only update the database when the player accepts the quest? Because it has no problem modifying the database, its just the fact that it does so regardless of the users selection.
  5. I am using the script which pops up a confirmation box to allow my users to select which quests they would like to partake in. Depending on what button is pressed, the user will either accept the quest, or decline it. If the user accepts the quest then I must modify the database with some new values to reflect the user accepting the quest. This doesn't work though because the values get updated in the database regardless of whether the user actually accepts the or declines the quest although the code for the mysql_query is found in the if ( confirm("Text Here") ) { portion of the script. This is how I have setup the confirmation script to work with the mysql_query, maybe I am somehow doing it wrong. <script>if ( confirm("Conditional Question To Start Quest") ) {document.write ("Comment about accepting quest.");document.write ("<font color=black><?=mysql_db_query ("$dbx", "UPDATE **** SET `*` = '*' WHERE * = '*'"); ?></font>");}else {document.write ("Comment about declining quest.");}</script> Now I have to use the font color command in the query because it will display a value of 1 which looks pretty unsightly. I'm sure that there is more likely a way to do this with AJAX but I am still trying to learn javascript. If someone could make me a script which will have the confirmation box, areas to modify for text depending on the action the user has taken and also the ability to properly modify the db when the quest is accepted, it would be much appreciated. Or at least show me how I would go about doing so.
  6. Well something seems to be wrong with your computer. No offense, but I installed IBserver and ran it immediately and it worked for me. But then again Im using WinXP.
  7. Okey, well installing it is one thing, running it is another. You need to actually have the program running in the background. So start up IBserver and then go to your localhost.
  8. Download IBserver, its very simple. http://sourceforge.net/projects/ibserver/Just download the newest version, install, and place your files in the www folder. Then in your browser go to http://localhost and you will find your files.
  9. Your index.html file will need to be a *.php file, your server would need to be configured to allow php as well. The actual code would be:<? include ("navmenu.html"); ?>
  10. You can't as far as I know, make a variable out of a number. Therefore your idea, although much simpler for making the names of the checkbox than mine, is not possible.
  11. Ummm. In the members table in your database, do you have a column with the title delbox? Thats your first mistake, your asking the query to delete all rows where the column (delbox) is equal to 1, which has nothing to do with your checkboxes. My suggestion is to give each checkbox a dynamic name. Your already using a for loop which increments $i each time, well why not combine that with the name delbox and that will be your dynamic checkbox name. Then when you pass the form, also pass the max number of rows in your query, then on the action page have another for loop which goes from 0 to the max rows again. Then, all you do is if ($delbox.$i == "On") { $sql -> DELETE....}else { do nothing}THat would be the best way. Also, checkboxes as you have seen in my If statement, don't return a 0 or 1, but an on or off.
  12. Use include ("navemenu.html") instead.
  13. Wanna make a bet? I've done it on 90% of my website. Trust me, it works. http://ca.php.net/manual/en/function.echo.php Look at the examples.
  14. Why do you need this if I may ask? Wat are you trying to do?
  15. Although While loops can do what your looking for, I believe it would be much easier for you to use for loops. It would lower the amount of coding you need to do.This is a for loop:for ($i=0;$i<$numsys;$i++) {content}Now the 0 should be replaced with your lower limit, its the value where $i will start the loop at.
×
×
  • Create New...