NiallThistle Posted July 16, 2011 Share Posted July 16, 2011 There must be something seriously fundamentally wrong with what I'm doing. I can't even get an individual field to display. It displays the text saying "Client:" but not the client name I'm looking for. FYI - the url ends with edit.php?action=contract&con=1 <?php include("conn.php"); ?> <?php $action = $_GET["action"]; // Amend a contract if($action == "contract") { echo"Client:"; $get_client = mysql_query(" SELECT C.client_name as clientname FROM val_clients C, val_contracts T WHERE T.contract_id = '".$_GET["con"]."' AND C.client_id = T.contracts_client ",$objConnect); while($data = mysql_fetch_array($get_client)) { echo"$data[clientname]"; } } else { echo""; } ?> Someone put me out of my misery!` Link to comment https://forums.phpfreaks.com/topic/242156-really-basic-piece-of-code-for-selecting-data/ Share on other sites More sharing options...
NiallThistle Posted July 16, 2011 Author Share Posted July 16, 2011 Nevermind contract, not contracts Link to comment https://forums.phpfreaks.com/topic/242156-really-basic-piece-of-code-for-selecting-data/#findComment-1243589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.