Jump to content

Tom Read

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by Tom Read

  1. So simple! Why I couldn't do that I'll never know, thanks alot!
  2. Hi. I'm doing a project at college, making a snooker league website. I have a form that has Team, Player and High Break. When submitted, they're stored in a database. This also updates the 'Player Stats' table. What I want to do is for the High Break column in the Player Stats table to update if the high break entered is greater than the value in the table already. For instance, if it says: Tom Read | 43, and in the form I type 36, I want it to remain as 43. If however a break for Tom Read added is 70, I want it to replace the 43. I can't quite get it right though! I want to say something along the lines of: mysql_query ("UPDATE player_table SET High_Break = $high_break IF $high_break > col_value WHERE Player_Name = '$player_name'"); Help would be appreciated, thanks
  3. Hi. I'm fairly new to PHP/MySQL so bare with me! I have a database in place with team names and players in. Each record has an auto-incrementing ID, a team name, and 5 player names. I have selected all the information from the table and have displayed the team names in a while loop, so it ticks through and displays them all ($row['Team_Name']. Basically, what I can't work out to do is how to make the team names hyperlinks, so that clicking on them goes to a new page where it lists their players. I tried <a href = "$row['Team_Name']"> . $row['Team_Name']; . <?a>, but I think it's a bit more complex than that as that doesn't work! Sorry if some of my syntaxing above is wrong - I'm on a college computer and my code is on my laptop so some stuff above is wrong, but I dare say you'll know exactly what I mean! Thanks.
  4. I would let you know if it's worked or not, but my XAMPP control panel won't start Apache. Keeps saying WARNING terminating worker thread 0. Best try and fix it!
  5. Hi all, currently being taught PHP in Computing at school and been set a task to do. I've grasped it all pretty quickly, but now I'm stuck! I have a database full of people's names and addresses etc. and need to create a drop down menu of their names, hit a search button, and for all their details to come up. I have all the names in the drop down menu and then I've managed to split that back into Forename and Surname using so I am able to do... WHERE Forename = $find_forename AND Surname = $find_surname (as putting them together into a drop down menu merges them together so it no longer knows that it's 2 different parts). I'm not sure how to pull out the data of that one person however, as I already have accessed the database in order to display their names, if that makes sense. So I need to hit the search button, then have my code pull out that one person's data and display that, with the drop down menu still showing. If someone could explain where I'm going wrong or what needs to be done, would be much appreciated! I don't know if that makes sense or not, probably not! Thanks 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.