nick323 Posted November 16, 2009 Share Posted November 16, 2009 Ok so I am pretty new to messing with PHP (about a week now) and I have been trying to figure this out all day. So I will show the code and explain what I am trying to do. <?php $numquery = "SELECT distinct num1, num2 from numdb where num1 = '$number'"; $result_numtype = $mysqli->query($numquery); $num = mysqli_num_rows($result_numtype); $i=0; while ($i < $num) { $numdata = mysqli_fetch_array($result_numtype,MYSQLI_ASSOC); ?> <tr> <td><?php echo '<a href="http://www.aol.com" target="_blank">' . $numdata["NumType"] . '</a>'; ?></td> </tr> <?php $i++; } ?> ok so num1 is not a unique on the table so it is just pulling anything that matches it but only one time of course, which will change based on the number that is entered on the previous page which is where $number is coming from. So my results might look something like this... 1 2 3 4 Right now with the code each one is a link to aol.com. What I want is for each item to be a link to another results page (or even the same page some where if that is possible) and then send over a variable of the returned result line. so 1 would send over 1, 2 would send 2 etc. I hope I explained this well enough, if I need to attempt to clarify please let me know. Thank you for the help Quote Link to comment 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.