kendallkamikaze Posted February 3, 2009 Share Posted February 3, 2009 sooo ive been trying to make it so when someone enters a horses brand from another area [i own a simulated horse game] when the brand is posted to mysql its posted as a link to the owner. This is the coding I have so far: <?php include 'header.php'; $query="update horsedata SET brand='" . $_POST['brand'] . "' WHERE id='" . $_POST['id'] . "' and Owner='$id'"; $checkresult = mysql_query($query); if ($checkresult) echo 'You have branded your horse.'; else echo 'update query failed'; mysql_close(); ?> <BR><BR> <a href="horse_individual.php?id=<?php echo $_POST["id"] ?>">click to go back to your horse</a> that posts what they imput on the pervious page but not a link back to the owner of the 'horse'. any ideas on how i could get it to do that? Link to comment https://forums.phpfreaks.com/topic/143657-posting-data-to-mysql-with-info-and-link/ Share on other sites More sharing options...
dennismonsewicz Posted February 3, 2009 Share Posted February 3, 2009 you could do another query that selects the owner name WHERE id = $id... not tested just quick thoughts Link to comment https://forums.phpfreaks.com/topic/143657-posting-data-to-mysql-with-info-and-link/#findComment-753752 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.