this is what i have so far.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$connection = mysql_connect('localhost', 'user', 'pass') or die('unable to connect');
mysql_select_db('dbhosts_downloadmyresume') or die('unable to select database') ;
$query = 'SELECT * FROM test_contact' ;
$result = mysql_query($query) or die('error in query: %query. ' . mysql_error()) ;
if (mysql_num_rows($result) > 0)
{
$file = '/home/dbhosts/public_html/resume/rtf.rtf' ;
$fh = fopen($file, 'w') or die('could not open file!') ;
while($row = mysql_fetch_object($result))
{
$first_name = $row->contactFname ;
$last_name = $row->contactLname ;
$street = $row->contactStreet ;
$city = $row->contactCity ;
$state = $row->contactState ;
$zip = $row->contactZip ;
$phone = $row->contactPhone ;
//This is where i need to enter the rtf mark up (this is where i need help)
$contactinfo = ''.$first_name.' '.$last_name.' ';
fwrite($fh, $contactinfo) or die('could not write to file!');
fclose($fh);
}
}
else
{
echo 'no rows found' ;
}
mysql_free_result($result) ;
mysql_close($connection) ;
?>
</body>
</html>