Jump to content

Selacius

Members
  • Posts

    134
  • Joined

  • Last visited

Everything posted by Selacius

  1. Yes you are. The script is for the back-end admin portion of my game. It will only be used by admins to make the maps used by my game. The reason I am doing this is because, at the moment I set up the size of the map, then a script outputs the map, with just a basic tile (grass), and inputs this information into the database. So why I want this script is so that I can mass change tiles. The actual x,y coordinates will not be changed by the user (me) but will serve as a reference to which tiles have been selected at the moment. After I've selected the tiles to be changed, I will have a drop down list which has the options of the tiles that it can be changed to. Once I hit the submit button, it will take me to a new page which for every tile selected, it will update the required database entry.
  2. That is exactly what I am looking for. But, it has to use images in both instances. Also, if possible, I'd want it to display the text boxes in a new window. The map itself is composed of smaller 20x20 images arranged in a grid, with the current script, the text boxes are displayed near the image, but what I'd like to do is have these boxes displayed as i said, on another page (all on the same) or after the image map. Also, another requirement is that the values for the tile (x and y) are actually put in the input box.
  3. Hmm. None of these are really what I am looking for. I hope that my question is clear enough.
  4. I want it so that when I click the images (individual tiles), 2 input boxes will be displayed on a pop up. The 2 boxes will correspond to the x and y coordinate of the tile. Now, when I click the image again, I want the 2 input boxes related to that image to be removed.
  5. At the moment, for me to create map sets for my RPG game I must change the tiles one at a time. I am looking for a script which allows me to select which tiles I want to change and then also what I want them changed to. Once I submit this form, then I will have a code that changes each tile. Now, the way I've thought of doing it is to have each tile as a link which when selected will add 2 input boxes (x and y coordinate), with the values for the tile. Now, once I reclick the tile, if its already selected then I would like the 2 input boxes pertaining to the tile to be removed. Any help would be awesome.
  6. Drop down menus don't work like that. When you type a new letter it doesn't add it to the previous, but replaces it. So what you see happening is exactly what should be happening. I am not sure if there is a way to change it.
  7. Actually, I solved my problem. I ran a query in phpmyadmin which copied a table from one database to another. Then I modified the resulting query to match the columns that were required for both the SELECT and INSERT. My main problem was I wasn't sure how to define the two different databases in the INSERT SELECT mysql query.
  8. I am aware I can use the Insert Select query, but I am curious how to do that when the two tables are in separate databases?
  9. Can I make a page where you select which folder you want to view and it displays all files which match a certain criteria (in this case have the file ending *.jpg).
  10. Nm. I got it figured out. I was using some whacked out code for eval, that was giving me that error. I got it figured out. Woo Hoo.
  11. Yea, I thought so too. I was testing it out completely wrong. But when I inserted the actual code into the database and did a mysql_query and such, the outputted value was the actual code that I had in the table value. So I tried eval, but I got this error: Parse error: parse error, unexpected T_VARIABLE in c:\ibserver\www\test\text2.php(8) : eval()'d code on line 1This is the code which is found in the column: $result = mysql_db_query ("$dbs","SELECT * FROM enemy WHERE eid='0'"); $row = mysql_fetch_array($result); $ename = $row['ename']; $estr = $row['estr']; $emin = 1.25 * $estr; echo "$ename - $emin";
  12. I am creating an online RPG, which is why I've asked so many questions around here. This next question is probably my biggest and hardest one yet. I am curious how and if I can put and later execute PHP code in a table entry. This is for my quest system and instead of having billions of pages for each quest, I would rather insert the php code necessary for each quest in the database. So for example, if I have an NPC which will initiate the quest, then in the NPCs database entry I will have one column where I would put some php code, such as mysql_queries, mathematics etc. I hope this is easy to understand. Thanks.
  13. I am looking for a script which will cause a certain frame to reload a new page. Now this script will execute when certain criteria from a PHP if statement is satisfied. Example, I have a page split into two frames, A & B. When something occurs in frame A, I want frame B to reload its page.php with page.php?value=variable.
  14. I am looking for a simple redirect script where I can set the target for where the page will be loaded. I have this already, <script language="JavaScript1.1"><!--location.replace("url");//--></SCRIPT>but it always opens in the same page that its being called from. I want it to reload the entire page, not just the single frame.
  15. Alrightie. Well I can change the IDs using a for loop, so it won't be too bad. And I think I'll just code in that when the script is finished running it will delete the table and remake it, so the ID will start back at 0.EDIT:Would this work by anychance? I am thinking more for when I completely empty the table and want the IDs to start back at 0.ALTER TABLE [tablename] AUTO_INCREMENT = [number] ???
  16. Its for an automatic fight system i am creating. When a player dies, he is eliminated from the database, and the ids have to be reset.
  17. I have a table, that has a column which is set to primary and also auto_increment. I am curious if there is a simple way to reset the counter back to 0. Two examples of this are:a) The table is full of 15 rows, with IDs 1-15. I delete row with ID=5. Now I want the table to be reset so that now the IDs are 1-14. I have 5 rows with IDs 1, 4, 7, 10, 15. Now I want them to be reset so that they will have IDs from 1-5. Without using a for statement to actually physically modify and update the rows, is there a way to reset the counter back to 0? Another example of this is:c) The table has 5 rows, the IDs are not important, although the final ID is 15, which means the next row will be ID 16. I empty out this table and reinsert data. I want the new rows to start back at 1, instead of 16.
  18. Im looking for something like this as well, except with pure numbers. I posted a topic about it a while back and got nothing, so it seems to be a lost cause here.
  19. Selacius

    While Loop

    I know and have used the while($row = mysql_fetch_array($result)) {} line for a while for various things, but I am curious if there is any easy way for me to select a single row and using this while command, or any other, have it cycle through the columns of that selected row. I can hard code for each column, but when my table is 27 columns long, that is a lot of code. Any ideas?
  20. Now how can I make a javascript drop down list, so the option selected from the first list, will be the first option in a second list??
  21. Im looking for a script which will immediately display on the page the value of the selected option of a drop down list. Any clues?
  22. First off, I am not sure what your trying to do with the If statement. I would personally write your code like this: <?phpif ($HTTP_POST_VARS["email"] != ""){$email = $HTTP_POST_VARS["email"];}else {echo ("Clicken Sie in Ihrem Browser zurück und füllen Sie bitte Alle Felder Aus!");}$result = mysql_query("SELECT * FROM buchen WHERE email=$email' ORDER BY 'id'");while ($row = mysql_fetch_array($result)){echo "# ";echo "<BR>", $row["name"];echo "<BR>", $row["tel"];echo "<BR>", $row["email"];echo "<BR>", $row["abflug"];echo "<BR>", $row["dest"];echo "<BR>", $row["datum"];echo "<BR><HR>";} You forgot to open the while tag, so it wasn't really looping through anything. This should work like you want it to.
  23. Selacius

    Basic Question

    Do you need to post this 3 times?
  24. Selacius

    user accounts

    Javascript doesn't work with databases. You would ahve to use PHP or ASP.
  25. I am looking for a javascript code which will modify the amount of values in a drop down list depending on the values selected in previous drop down menus. Example, I have 3 drop down lists where the maximum value is a total of 5. Now the first list will have 0 to 5, the second will have x-5, and the third will have y-5. Where x is the value selected in the first list, and y is the value from the second.
×
×
  • Create New...