Jump to content

ghosttr

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ghosttr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So if i put the submit button with the form does that mean I have to have a button for every form? And is there any way for it to get all of the data then organize it so it can go into the database?
  2. Im trying to make a form that stores standing information for a game. Problem is that the games browser is picky, and will only use php/html. I have setup the database and made some forms Here is a picture of what im stalking about http://dl.eve-files.com/media/0709/changewindow.PNG I used an invisible form to do it, and at first i thought it worked. But unfortunately it only worked for the first field :'( Here the the code for 1 row in this page <tr> <td><A href=showinfo:16159//<?php print $results[0]['id'];?>><?php print $results[0]['name'];?></A></td> <td><font color=#<?php print $results[0]['color']; ?>>|||||||||||||||||||||||||||||||||||</font></div></td> <td><form action="Untitled-1.php" method="post" > <select name="select" id="select"> <option value="<?php print $results[0]['color']; ?>" selected>Keep Standings</option> <option value="3300FF">+10</option> <option value="3399FF">+5</option> <option value="FFFFFF">Neutral</option> <option value="FF9900">-5</option> <option value="FF0000">-10</option> <option value="33FF00">Self</option> </select> <input type="hidden" name="id" value=<?php print $results[0]['id'];?> id="allianceid"> </form><input type="submit" name="select2" id="select2" value="Submit"> </td> </tr> And heres for how i am updating the database $first=$_POST['select']; $second=$_POST['id']; $query1 = "UPDATE evealliances SET color ='$first' WHERE (id='$second')"; mysql_query($query1); What i need is to be able to get all of these working, either with 1 or multiple submit buttons. I know i can create unique forms, buttons and queries. For each row, but there are over 50 rows here. And there has to be a better way to do it ??? ??? ???
  3. I have 2 fields that i need sent with one form, but I only need the user to see 1 form when submitting. Can anyone tell me how this can be accomplished?
  4. I have 2 fields that i need sent with one form, but I only need the user to see 1 form when submitting. Can anyone tell me how this can be accomplished?
  5. ok i got that working But that just lead to other problems :'( I have a list of names that i get from the database in the first column In the second column i have text displayed as a color, also from the db. The form lets you select a different color and change it, and it refers to the name. Is there a way to specify the name in the form?
  6. I am having problems using variables in my my sql queries, and i dont know what im doing wrong. This works //Database Connection $query = "UPDATE INTO TABLE <table> WHERE id='102441019' SET color ='FFFF00'"; But the same thing using a variable does not ??? ??? //Database Connection $1="FFFF00"; $query = "UPDATE INTO TABLE <table> WHERE id='102441019' SET color ='$1'";
  7. Well that works too, but i would also like to be able to let other who dont have database access edit the list if i need them to. If I could add a form to the results it would mean that i could provide a link to the page and have someone else edit it. And I could remove the second table and just use a select command to get the data, edit it through the forms and repost it back into the original database.
  8. I have a list of items that when imported to my database have no value. I need to give each item a value, which i have been doing manually through phpmyadmin. I have been using a script that moves the unedited items to a different table that i merge with the real list when im done editing it. The problem is that this is very time consuming. So i have this script which is pulling the list of unedited items, and displaying them in a form. And what needs done is that for every item it lists the script also needs to generate a form with it, so that i can just enter my data, and submit it when im all done. Im still new to php and haven't been able to find a way to do this. I need something like this for every <item> insert <form> that will generate a form for every item
  9. I have this code displays my database information in a table. I have a 2 column table the first column is for the data, the second is where i want the script to put the form. <?php $username="<username>"; $password="<password>"; $database="<database>"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "SELECT name FROM <table1>"; $result = mysql_query($query) or die(mysql_error()); echo "<table border='1'>"; echo "<tr><th>Name</th><th>Value</th></tr>"; while($row = mysql_fetch_array($result)){ echo "<tr><td>"; echo $row['name']; echo "</td><td>"; } echo "</table>"; //} ?> Since the number of items will vary from time to time its not very practical to create static forms either
×
×
  • 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.