OK here is my situation. I'll keep this as hypothetical as possible since it's a simple problem, but after going through about 25 posts through the search and not finding the solution, I've decided to post.
Here is my situation. I want to have a table with user ids, etc. etc. It's pulling that info from mysql. All of this works great, so great I don't think I'll need to post the actual data inside. But basically, it has name, email, address, phone, etc.
while ($form = mysql_fetch_assoc($form_results)) {
/* Information is in here, which pulls the needed info correct */}
Now, I want to create a script which will allow me to click a mailto: link so that when I click on the link, it will email to all those who are in the database, and have entered a database. I want it to also skip any of those who do not have an email address entered. That can be done by doing something like this:
while ($form = mysql_fetch_assoc($form_results)) {
$email = $form['email'];
if($email="")
else echo "$email";}
(Which HTML Before and after setting the values up as a link. I haven't gotten around to dealing with adding commas and not doing so on the last one, but that is something I will worry about once I get over this problem)
Here's my problem, incase you can't already tell. On the second query, Nothing shows up. The while loop isn't initiated. I am 99% positive that this is becuase the first while loop has executed, and I'm trying to reenter the same loop.
Here's my though-provoked solutions, but not enough php experience to be able to translate it:
1) Have an ability to exit the first loop, to close off the table which holds all the first loops information (Only want to do this once, rather than in a loop, becuase looping it, I would have a ton of unneeded </table>'s), and reenter it to set up the link values.
2) Have an ability to reset the old while() and start a new one. Not sure the process to do this. I did throw in a reset($form) before reusing the same while loop, but that doesn't work, although it's not impossible for me to have done something wrong.
Thanks everyone for reading through all this! I typed a lot to hopefully narrow down the problem as much as possible. Thanks again!