Hello...
I am creating a form for my company... When the form is submitted an auto_incremented ID field is created... This record is important because the person needs to enter it 30 days later so they can add a "follow-up report"...
I have gotten it to show up on my "formResults.php" page using two lil blocks of code...
PHP Code:
<?php
// this is in the head... the query selects the recordID field as rID
$query2 = "SELECT recordID AS rID FROM emp_ad_records WHERE empID='$empID'";
$loginUsername = mysql_query($query2) or die(mysql_error());
?>
<?php
// in order to extract the info I need and print it on the page I am running this little code in the spot where it is to print:
while ( $row = mysql_fetch_assoc($loginUsername) )
{
echo "<span style='color:#FFFFFF;'>#".$row['rID']."</span>";
}
?>
I tried doing something similar in the part of the code where I create the mail body
I created an identical variable (just has a different name):
PHP Code:
<?
$recID = while ($myrow = mysql_fetch_assoc($loginUsername))
{
echo $myrow["rID"];
}
?>
and then called $recID like anyother variable in the mail field... But nothing shows up in the email...
I have been stuck on this for a few and would appreciate some fresh input! Has anyone dealt with a similar problem before?
thanks,
Pat
__________________
But dreaming just comes natural
Like the first breath from a baby,
Like sunshine feeding daisies,
Like the love hidden deep in your heart.
~J.Prine
|