Ok, here's what I have so far.
$result = mysql_query( "select * from rx where username = '$valid_user'");
if (!$result)
return false;
echo("<form name=test action=test_stuff.php method=post>");
$x = 0;
while ($daps = mysql_fetch_array($result)){
$x++;
echo "<input type=text name='rx$x' value='$daps[rx_num]'><BR>";
}
echo"<input type=hidden name=x value='$x'>";
echo"<input type=submit value=Submit>";
echo"</form>";
SO, what it's doing is pulling the rx number from the db and assigning it as a value to an auto-counted form input. The extra hidden value is so I can have a count on the next page. That's this:
require_once("rx_fns.php");
session_start();
check_valid_user();
$i=0;
$numMax=$x;
while($i != $numMax){
$i++;
echo"$rx$i - <BR>";
}
The problem is that last part. $rx$i. I'm trying to call the value from the form and the i is supposed to be that autogenerated number from the first page. Not sure if that's explained very well, but it's the best I can muster as tired as I am.
ALSO, you may be asking what the point is. Well, my plan is to actually do something like the following:
Have the RX #s displayed on one page w/ checkboxes OR a javascript menu that allows mutiple selections. I think I'm leaning towards check boxes. THEN, when the form is posted the next page will check which values have been checked. Those values will THEN be echo'd and entered into a mail function. To me this could get complicated since a user could have any number of RX #'s. If someone is willing to help me with this plan, I am MORE than open to suggestions as I really am not sure how to go about this.