jobs1109 Posted August 13, 2011 Share Posted August 13, 2011 Hi Everyone, I have a database with the following data (JobTitle, Company, Salary,Description,CompanyURL,PhoneNumber,Requirements,JobCategory,JobType,Apply_To,Email,State,Address,Country,Zipcode) I have the following code that pull out selected data <?php // getting data from table "Job-board" $query = "SELECT * FROM Job-board"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)){ echo "Job Title: ".$row['JobTitle']; echo "<br><br> Company: ".$row['Company']; echo " <br><br>Salary: ".$row['Salary']; echo "<br> Description: ".$row['Description']; echo "<br><br><br>"; } ?> How do I make one of the output for example "Job-Title" a link so that when users click they get the rest of the information related to that job. Like Company, Salary,Description,CompanyURL,PhoneNumber,Requirements,JobCategory,JobType,Apply_To,Email,State,Address,Country,Zipcode ? Thanks DS Quote Link to comment https://forums.phpfreaks.com/topic/244680-links-with-php-results/ Share on other sites More sharing options...
spfoonnewb Posted August 13, 2011 Share Posted August 13, 2011 Something like this, for example. <?php $result = mysql_query(" SELECT `JobTitle`, `Company`, `Salary`, `Description`, `CompanyURL`, `PhoneNumber`, `Requirements`, `JobCategory`, `JobType`, `Apply_To`, `Email`, `State`, `Address`, `Country`, `Zipcode` FROM `Job-board` ") or die(mysql_error()); while ($row = mysql_fetch_array($result)) { echo 'Job Title: <a href="http://www.destination.com/">'.$row['JobTitle'].'</a><br /><br />'; echo 'Company: '.$row['Company'].'<br /><br />'; echo 'Salary: '.$row['Company'].'<br />'; echo 'Description: '.$row['Company'].'<br /><br /><br />'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/244680-links-with-php-results/#findComment-1256766 Share on other sites More sharing options...
jobs1109 Posted August 13, 2011 Author Share Posted August 13, 2011 Hi, Thanks for the help. The title gets a link but when goes to the second page nothing show up. I woul like user to click on the link and get more details for the job they select. Thanks D.S Quote Link to comment https://forums.phpfreaks.com/topic/244680-links-with-php-results/#findComment-1256848 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.