Jump to content

Pomtom44

New Members
  • Posts

    8
  • Joined

  • Last visited

Pomtom44's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. the table structure is messy as its an example. and thanks Barand for the tip. ill try it out see if I can get what I want from it
  2. Most of that went right over the top of my head sorry. I do have a auto assigned ID value in there as well (I thought that was just standard practise so I didnt mention it) As for count() I had a look but couldnt figure out how to get it to display the most hit result rather than how many times a certain value was entered
  3. Hey all. Kinda new to PHP and MySql so please be gentle haha Im wanting to make a page which goes though my database and finds the most used word in a column then display it on screen. but with different search requests. Heres an example Database: Name: Entry: Result Tom A 1 Jim B 2 Tom A 1 Sam A 1 Jim B 2 Sam A 3 Sam B 2 Tom A 2 What number comes up most for Tom A What number comes up most for Sam B What number comes up most for Sam A And so on. Hope it makes sense and hope someone can help me out
  4. Oh no that sort of code i have fine. Im looking for a way to list the whole database in a table of form entries using php. A front end way to edit the whole database (apart from row ID)
  5. It would be nice to be able to. but its not required if it has alot of code behind it
  6. Hey everyone. I am farly new to PHP and MySQL so I do say sorry in advance for any stupid lines of code I have written. But I am stuck at a point in a website im making for a friend. I have a database with a unknown amount of entries. I have currently found a way to make a list of entries appear in a table. and add a edit button to edit each entry separately on another page however what I would like is a table with all the entries in so they can admin all the entries without having to go though phpmyadmin I know it has something to do with arrays. But i cant seem to find a simple explanation for what im wanting to do So im hoping someone here can either give me a link to something that will help. or explain it to me in simple terms. Thanks in advance PomTom I can provide code if required from my other working pages but i figured since its a new page im making theres no code written to provide
  7. Ah is it something really that stupidly simple. I swear both my and my friend looked over this code so many times trying to figure this out. I shall try it now and let you know. Thanks for the help btw. (How did I miss that?)
  8. Hey all. Im slightly new to PHP and MYSQL so sorry if my code is a mess and has "odd ways" of doing things. But it works for me so far and thats all that matter really isnt it? Anyway I have a php script that generates a table of information. What i would like is a Edit button for each row of that table so when pressed it will open a new page with a form where the user can update the fields for that entry. I have messed around a little bit with ideas i know from my limited HTML and PHP but can't seem to get it to work and not sure what to put when i google it so I cant seem to find a solution anywhere Currently it is sending the last ID that it loads into the table no matter what edit button you press. Here is my current code echo "<table border='1'>"; echo "<tr> <th>Edit</th> <th>CardID</th> <th>Location</th> <th>Date Placed</th> <th>Found</th> <th>Date Found</th> <th>Found By</th> </tr>"; while($row = mysql_fetch_array($cards)) { echo "<tr><td>"; $cardID = $row['MemberCode'] . $row['CardID']; echo "<form action='../editcard.php' method='POST'>"; echo "<input type='hidden' name='CardID' value='"; echo $CardID; echo "'>"; echo "<input type='Submit' value='Edit'>"; echo "</td><td>"; echo $CardID; echo "</td><td>"; echo $row['Location']; echo "</td><td>"; echo $row['DatePlaced']; echo "</td><td>"; $found = $row['Found']; if ($found == 1) { echo "yes"; } else { echo "no"; } echo "</td><td>"; echo $row['DateFound']; echo "</td><td>"; echo $row['FoundBy']; echo "</td></tr>"; } echo "</table>"; Thanks for any help in advance
×
×
  • 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.