Jump to content

galone

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

galone's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks. Also (sorry for the questions), basically all the names of the clubs are listed in a drop down that I made: $res=mysql_query("SELECT name FROM clubs ORDER BY name ASC"); if(mysql_num_rows($res)==0) echo "There is no data in table."; else for($i=0;$i<mysql_num_rows($res);$i++) { $row=mysql_fetch_assoc($res); echo"<option>$row[name]</option>"; Now, how do I make it so that echo "<input type=submit value=Edit>"; is added, it can trace the specific name and data, and make them into variables to show so you can edit them in textboxes? Some sort of query but I can't remember... Thanks again.
  2. Thanks. Also, how would I arrange them in alphanumeric order? Like for example: $result = mysql_query("SELECT id, name, category, description, website, contact, email, moment FROM clubs"); echo '<TABLE border="1"><TR><TH>Club<TH>Category<TH>Website<TR>'; while ($row = mysql_fetch_array($result)) { echo '<TH><p align="left">', $row{'name'}; echo '</p><TD><p align="center">', $row{'category'}; echo '</p><TD>', $row{'website'}, '<TR>'; } echo '</TABLE>'; How would I make it so that once I make the Club/Category/Website clickable, it will go ascending? Then if clicked again, descending? Thanks.
  3. I have a table, and I want to insert the data: Name Type (so that's Name, then two spaces, then type) However, my table has more than two kinds of data (such as id auto increment, location, etc) ... but I want it to autoincrement for id, and leave the other values blank. What's the best way to do this? here's an example: CREATE TABLE `people` ( `id` int(3) NOT NULL auto_increment, `name` var(50) NOT NULL. `type` varchar(100) NOT NULL, `location` varchar(500) NOT NULL, And I have the following data: Albert Cool Joanne Lazy Jim Bored So: insert into `people` (x, albert, cool, blank) ... etc. So in the end, I want to convert Albert Cool into the insert into, then process it into the database with x increasing everytime for the person, however leaving location blank. I'm sorry if it confuses you. How would I do this? Thanks.
×
×
  • 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.