Jump to content

izbryte

Members
  • Posts

    85
  • Joined

  • Last visited

    Never

Everything posted by izbryte

  1. thanks so much for helping me but it still isn't working. do you think it could have something to do with the text? Here is an example of what is being pulled from the database:
  2. Thank you but I'm still a bit confused. Your code worked great when I tried it out as is but when I pull the text from the database it doesn't show the link. Am I doing something wrong? Here's my code; $contact = stripslashes(nl2br($row['contact'])); $newString = ""; $mailArray = explode(" ",$contact); foreach ($mailArray as $word){ if(ereg('^([-a-zA-Z0-9.]+@[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+)*$', $word)){ $newString.= "<a href=\"mailto:".$word."\">".$word."</a> "; }else{ $newString.= $word." "; } } echo $newString;
  3. If someone enters an email address or website into a textarea (which then goes to a mySQL database) is there a way to show those links as hyperlinks instead of plain old text when pulled back out ?
  4. Wow you guys are fast! AND SO SMART! Thanks!
  5. I have this query and I'm trying to echo some text if there are no results but it's not working. I'm sure this is either me being a bonehead or it's been WAY too long since I took my last mySQL class... LOL Here's what I have: $query = "SELECT * from firms ORDER BY firmID DESC"; $result = mysql_query($query); if ($result){ while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo (whatever the results were); } } else{ echo "No results found."; } My results are coming up fine but if it's empty I just see blank.... Thanks!
  6. I have a page of firm listings and I would like to allow the visitors to be able to click on a letter A-Z that will display only the firms that begin with that letter. I have been working on it but it's not working for me. I was hoping someone could tell me what I'm doing wrong. For the links I have then in the code I have: Finally the query: I get no results though there should be some. What am I doing wrong? Thanks!
  7. I have a page where people can make postings but I only want them to be viewable for 30 days. I'm putting it into the database with the NOW() function. When I bring it back out how do I check to make sure the posting hasn't expired?
  8. Hi! I've installed Links Hack from phpbbhacks.com on my forum (which works fine) but I want to modify it so that Admin has to approve the link before it will show up on the board. Can anyone help me that?
  9. Ok, but is it possible to shorten just the URL that's in the article? I've tried using the exact width but it's still not working. You can see what I mean here.
  10. How do I format the date to 'm.d.y' within my results? Sorry if I'm a bonehead!
  11. I have a table that is supposed to be only 400 pixels wide where I'm posting some articles that are pulled out of a mysql database using PHP. Sometimes the articles will contain a really long URL and it pushes the width of my table column so that it's larger than 400 pixels. Is there a way I can control the size of the URL or force it to break and continue on the next line?
  12. I'm pulling up an article from a database but I only want to show the first 300 characters of it. How can I get rid of the rest?
  13. I'm trying to transfer a database from one server to another. I have phpMyAdmin set up with both servers. How (specifically because I'm clueless) do I transfer all the info from one database to the other? Thanks in advance for your help!
  14. Ok. Here's the whole thing [code]<?php # Script 3.12 - register.php // Set the page title and include the HTML header. $page_title = 'Submit Your Resume!'; include ('header.tpl'); if (isset($_POST['submit'])) { // Handle the form. // Check for a first name. if (strlen($_POST['fname']) > 0) { $fn = TRUE; $fname = ($_POST['fname']); } else { $fn = FALSE; echo '<p class="red">You forgot to enter your first name.</p>'; } // Check for a last name. if (strlen($_POST['lname']) > 0) { $ln = TRUE; $lname = ($_POST['lname']); } else { $ln = FALSE; echo '<p class="red">You forgot to enter your last name.</p>'; } // Check for an email address. if (strlen($_POST['email']) > 0) { $e = TRUE; $email = ($_POST['email']); } else { $e = FALSE; echo '<p class="red">You forgot to enter your email address.</p>'; } // Check for phone 1. if (strlen($_POST['phone']) > 0) { $p1 = TRUE; $phone = ($_POST['phone']); } else { $p1 = FALSE; echo '<p class="red">You forgot to enter your phone number.</p>'; } // Check for address. if (strlen($_POST['phone2']) > 0) { $p2 = TRUE; $phone2 = ($_POST['phone2']); } else { $p2 = ' '; } // Check for address. if (strlen($_POST['address']) > 0) { $a1 = TRUE; $address = ($_POST['address']); } else { $a1 = FALSE; echo '<p class="red">You forgot to enter your address.</p>'; } // Check for address 2. if (strlen($_POST['address2']) > 0) { $a2 = TRUE; $address2 = ($_POST['address2']); } else { $address2 = 'None specified.'; } // Check for city. if (strlen($_POST['city']) > 0) { $c = TRUE; $city = ($_POST['city']); } else { $c = FALSE; echo '<p class="red">You forgot to enter your city.</p>'; } // Check for state. if (strlen($_POST['state']) > 0) { $s = TRUE; $state = ($_POST['state']); } else { $s = FALSE; echo '<p class="red">You forgot to enter your state.</p>'; } // Check for zip. if (strlen($_POST['zip']) > 0) { $z = TRUE; $zip = ($_POST['zip']); } else { $z = FALSE; echo '<p class="red">You forgot to enter your zip code.</p>'; } // Check for country. if (strlen($_POST['country']) > 0) { $co = TRUE; $country = ($_POST['country']); } else { $country = ' '; } // Check for undergrad school. if (strlen($_POST['undergrad_school']) > 0) { $us= TRUE; $undergrad_school = ($_POST['undergrad_school']); } else { $undergrad_school = ' '; } // Check for undergrad degree. if (strlen($_POST['undergrad_degree']) > 0) { $ud= TRUE; $undergrad_degree = ($_POST['undergrad_degree']); } else { $undergrad_degree = ' '; } // Check for grad school. if (strlen($_POST['grad_school']) > 0) { $gs= TRUE; $grad_school = ($_POST['grad_school']); } else { $grad_school = ' '; } // Check for grad degree. if (strlen($_POST['grad_degree']) > 0) { $gd= TRUE; $grad_degree = ($_POST['grad_degree']); } else { $grad_degree = ' '; } // Check for current position. if (strlen($_POST['position']) > 0) { $cp= TRUE; $position = ($_POST['position']); } else { $position = ' '; } // Check for market sector. if($_POST['market_sector'] == 'NULL') { $market_sector = ' ';         }         else {                 $ms= TRUE; $market_sector = ($_POST['market_sector']);         } // Check for current employer. if (strlen($_POST['employer']) > 0) { $ce= TRUE; $employer = ($_POST['employer']); } else { $employer = ' '; } // Check for years experience. if (strlen($_POST['yrs_exp']) > 0) { $ye= TRUE; $yrs_exp = ($_POST['yrs_exp']); } else { $yrs_exp = ' '; } // Check for relocate. if($_POST['relocate'] == 'NULL') { $relocate = ' ';         }         else {                 $r= TRUE; $relocate = ($_POST['relocate']);         } // Check for relocate area. if (strlen($_POST['relocate_area']) > 0) { $ra= TRUE; $relocate_area = ($_POST['relocate_area']); } else { $yrelocate_area = ' '; } if ($fn) { // If everything's okay. // we'll begin by assigning the To address and message subject   $to="brobilio@eyesbryte.com";   $subject="Resume Submitted";   // get the sender's name and email address   // we'll just plug them a variable to be used later   $from = stripslashes($_POST['fname'])." ".stripslashes($_POST['lname'])."<".stripslashes($_POST['email']).">";   // generate a random string to be used as the boundary marker   $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";   // store the file information to variables for easier access   $tmp_name = $_FILES['filename']['tmp_name'];   $type = $_FILES['filename']['type'];   $name = $_FILES['filename']['name'];   $size = $_FILES['filename']['size'];   // here we'll hard code a text message   // again, in reality, you'll normally get this from the form submission   $message = "Name: $fname $lname\n\nEmail: $email\n\nPhone: $phone\n\nAlternate Phone: $phone2\n\nAddress 1:\n$address\n$city, $state $zip $country\n\nAddress 2: \n$address2\n$city, $state $zip $country\n\nUndergraduate Institution: $undergrad_school\n\nUndergraduate Degree: $undergrad_degree\n\nGraduate School: $grad_school\n\nGraduate Degree: $grad_degree\n\nCurrent Position: $position\n\nMarket Sector: $market_sector\n\nCurrent Employer: $employer\n\nYears of Experience: $yrs_exp\n\nWilling to Relocate? $relocate\n\nRelocation Preference: $relocate_area";   // if the upload succeded, the file will exist   if (file_exists($tmp_name)){       // check to make sure that it is an uploaded file and not a system file       if(is_uploaded_file($tmp_name)){         // open the file for a binary read         $file = fopen($tmp_name,'rb');         // read the file content into a variable         $data = fread($file,filesize($tmp_name));         // close the file         fclose($file);         // now we encode it and split it into acceptable length lines         $data = chunk_split(base64_encode($data));     } }       // now we'll build the message headers       $headers = "From: $from\r\n" .         "MIME-Version: 1.0\r\n" .         "Content-Type: multipart/mixed;\r\n" .         " boundary=\"{$mime_boundary}\"";       // next, we'll build the message body       // note that we insert two dashes in front of the       // MIME boundary when we use it       $message = "This is a multi-part message in MIME format.\n\n" .         "--{$mime_boundary}\n" .         "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .         "Content-Transfer-Encoding: 7bit\n\n" .         $message . "\n\n";       // now we'll insert a boundary to indicate we're starting the attachment       // we have to specify the content type, file name, and disposition as       // an attachment, then add the file content and set another boundary to       // indicate that the end of the file has been reached       $message .= "--{$mime_boundary}\n" .         "Content-Type: {$type};\n" .         " name=\"{$name}\"\n" .         //"Content-Disposition: attachment;\n" .         //" filename=\"{$fileatt_name}\"\n" .         "Content-Transfer-Encoding: base64\n\n" .         $data . "\n\n" .         "--{$mime_boundary}--\n"; @mail($to, $subject, $message, $headers); echo "<br><p align='center' class='red'>Thank you $fname $lname. <br>Your resume has been sent successfully. <br>You will be contacted by us shortly.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"; } else { echo "<p align='center' class='red'>Please go back and try again.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"; } } else { // Display the form. ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"   enctype="multipart/form-data" name="form1"> <table width="760" border="0" cellspacing="0" cellpadding="0">       <tr>         <td width="95%" align="center" valign="top"><div align="left">           <p><img src="images/titles_resume.gif" alt="Submit Your Resume" width="221" height="47" hspace="10"></p>           <table width="95%"  border="0" align="center" cellpadding="4" cellspacing="2">             <tr>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Personal Information </td>               <td width="1" rowspan="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Education</td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>First Name: </b></td>               <td><input name="fname" type="text" id="fname" maxlength="25"></td>               <td><b>Undergraduate Institution: </b></td>               <td><input name="undergrad_school" type="text" id="undergrad_school"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Last Name: </b></td>               <td><input name="lname" type="text" id="lname" maxlength="30"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Undergraduate Degree: </b></td>               <td><input name="undergrad_degree" type="text" id="undergrad_degree"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Email Address: </b></td>               <td><input name="email" type="text" id="email" maxlength="50"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Graduate Institution: </b></td>               <td><input name="grad_school" type="text" id="grad_school"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td bgcolor="#A5D9F1"><b>Phone:</b></td>               <td><input name="phone" type="text" id="phone" maxlength="12"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Graduate Degree:</b></td>               <td><input name="grad_degree" type="text" id="grad_degree"></td>             </tr>             <tr>               <td bgcolor="#A5D9F1"><b>Alt. Phone </b></td>               <td bgcolor="#A5D9F1"><input name="phone2" type="text" id="phone2" maxlength="12"></td>               <td>&nbsp;</td>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Professional Information </td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Address 1:</b></td>               <td><input name="address" type="text" id="address" maxlength="60"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Current Postition:</b></td>               <td><input name="position" type="text" id="position"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Address 2: </b></td>               <td><input name="address2" type="text" id="address2" maxlength="60"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Market Sector:</b></td>               <td><select name="market_sector" size="1" class="small_text style1" id="market_sector">       <option value="NULL">Choose one...</option>       <option value="Hospitality/Hotel & Casino Projects">Hospitality/Hotel &amp; Casino       Projects</option>       <option value="Healthcare/Hospital/Lab Projects">Healthcare/Hospital/Lab Projects</option>       <option value="Retail, Mixed-use & Urban Planning Projects">Retail,       Mixed-use &amp; Urban Planning Projects</option>       <option value="K-12 Public School & Higher Education Projects">K-12       Public School &amp; Higher Education Projects</option>       <option value="Single Family, Multi-family & Hi-rise Condo Projects">Single       Family, Multi-family &amp; Hi-rise Condo Projects</option>       <option value="Commercial Office Buildings & Corporate Workplace Interiors">Commercial       Office Buildings &amp; Corporate Workplace Interiors</option>       <option value="Industrial Parks & Tilt-up Projects">Industrial Parks &amp; Tilt-up       Projects</option>       <option value="Government/Municipal Projects">Government/Municipal Projects</option>       <option value="Theme Park/Entertainment Projects">Theme Park/Entertainment Projects</option>       </select></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>City:</b></td>               <td><input name="city" type="text" id="city" maxlength="30"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Current Employer: </b></td>               <td><input name="employer" type="text" id="employer"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>State:</b></td>               <td><input name="state" type="text" id="state" maxlength="2"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Years of Experience: </b></td>               <td><input name="yrs_exp" type="text" id="yrs_exp"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Zip Code: </b></td>               <td><input name="zip" type="text" id="zip" maxlength="5"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Are you willing to relocate? </b></td>               <td><b>                 <select name="relocate" size="1" id="relocate">           <option value="NULL" selected>Choose one...</option>           <option value="Yes">Yes</option>           <option value="No">No</option>               </select>               </b></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Country:</b></td>               <td><input name="country" type="text" id="country" maxlength="25"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Relocation Preference:<br>                 (State/Region/Country) </b></td>               <td><input name="relocate_area" type="text" id="relocate_area"></td>             </tr> <tr align="center" valign="middle" bgcolor="#FFFFFF">               <td height="1" colspan="5"><img src="images/spacer.gif" width="1" height="1"></td>             </tr>             <tr align="center" valign="middle" bgcolor="#A5D9F1">               <td colspan="5"><b>Upload your resume:                   <input type="file" name="filename">               </b></td>             </tr>             <tr align="center" valign="middle" bgcolor="#A5D9F1">               <td colspan="5"><input type="submit" name="submit" value="Submit"></td>             </tr>           </table> </form><!-- End of Form --> <?php } include ('footer.tpl'); // Include the HTML footer. ?>[/code]
  15. I have an email form where the visitor can upload a file as an attachment that then gets emailed. If they choose not to upload a file the email still comes through with an attachment (txt file). How can I get rid of the attachment if there is no uploaded file? Here's the code I have for the attachment:[code]  // if the upload succeded, the file will exist   if (file_exists($tmp_name)){       // check to make sure that it is an uploaded file and not a system file       if(is_uploaded_file($tmp_name)){         // open the file for a binary read         $file = fopen($tmp_name,'rb');         // read the file content into a variable         $data = fread($file,filesize($tmp_name));         // close the file         fclose($file);         // now we encode it and split it into acceptable length lines         $data = chunk_split(base64_encode($data));     } }[/code]
  16. This is a job application that people can fill out online and then gets emailed. Everytime I hit submit it just displays the form again and doesn't send the email. Sorry it's long. [code]<?php // Set the page title and include the HTML header. $page_title = 'Submit Your Resume'; include ('header.tpl');   if ($_SERVER['REQUEST_METHOD']=="POST"){ // Check for a first name. if (strlen($_POST['fname']) > 0) { $fn = TRUE; $fname = ($_POST['fname']); } else { $fn = FALSE; echo '<p class="red">You forgot to enter your first name.</p>'; } // Check for a last name. if (strlen($_POST['lname']) > 0) { $ln = TRUE; $lname = ($_POST['lname']); } else { $ln = FALSE; echo '<p class="red">You forgot to enter your last name.</p>'; } // Check for an email address. if (strlen($_POST['email']) > 0) { $e = TRUE; $email = ($_POST['email']); } else { $e = FALSE; echo '<p class="red">You forgot to enter your email address.</p>'; } // Check for phone 1. if (strlen($_POST['phone']) > 0) { $p1 = TRUE; $phone = ($_POST['phone']); } else { $p1 = FALSE; echo '<p class="red">You forgot to enter your phone number.</p>'; } // Check for address. if (strlen($_POST['phone2']) > 0) { $p2 = TRUE; $phone2 = ($_POST['phone2']); } else { $p2 = ' '; } // Check for address. if (strlen($_POST['address']) > 0) { $a1 = TRUE; $address = ($_POST['address']); } else { $a1 = FALSE; echo '<p class="red">You forgot to enter your address.</p>'; } // Check for address 2. if (strlen($_POST['address2']) > 0) { $a2 = TRUE; $address2 = ($_POST['address2']); } else { $address2 = 'None specified.'; } // Check for city. if (strlen($_POST['city']) > 0) { $c = TRUE; $city = ($_POST['city']); } else { $c = FALSE; echo '<p class="red">You forgot to enter your city.</p>'; } // Check for state. if (strlen($_POST['state']) > 0) { $s = TRUE; $state = ($_POST['state']); } else { $s = FALSE; echo '<p class="red">You forgot to enter your state.</p>'; } // Check for zip. if (strlen($_POST['zip']) > 0) { $z = TRUE; $zip = ($_POST['zip']); } else { $z = FALSE; echo '<p class="red">You forgot to enter your zip code.</p>'; } // Check for country. if (strlen($_POST['country']) > 0) { $co = TRUE; $country = ($_POST['country']); } else { $country = ' '; } // Check for undergrad school. if (strlen($_POST['undergrad_school']) > 0) { $us= TRUE; $undergrad_school = ($_POST['undergrad_school']); } else { $undergrad_school = ' '; } // Check for undergrad degree. if (strlen($_POST['undergrad_degree']) > 0) { $ud= TRUE; $undergrad_degree = ($_POST['undergrad_degree']); } else { $undergrad_degree = ' '; } // Check for grad school. if (strlen($_POST['grad_school']) > 0) { $gs= TRUE; $grad_school = ($_POST['grad_school']); } else { $grad_school = ' '; } // Check for grad degree. if (strlen($_POST['grad_degree']) > 0) { $gd= TRUE; $grad_degree = ($_POST['grad_degree']); } else { $grad_degree = ' '; } // Check for current position. if (strlen($_POST['position']) > 0) { $cp= TRUE; $position = ($_POST['position']); } else { $position = ' '; } // Check for market sector. if($_POST['market_sector'] == 'NULL') { $market_sector = ' ';         }         else {                 $ms= TRUE; $market_sector = ($_POST['market_sector']);         } // Check for current employer. if (strlen($_POST['employer']) > 0) { $ce= TRUE; $employer = ($_POST['employer']); } else { $employer = ' '; } // Check for years experience. if (strlen($_POST['yrs_exp']) > 0) { $ye= TRUE; $yrs_exp = ($_POST['yrs_exp']); } else { $yrs_exp = ' '; } // Check for relocate. if($_POST['relocate'] == 'NULL') { $relocate = ' ';         }         else {                 $r= TRUE; $relocate = ($_POST['relocate']);         } // Check for relocate area. if (strlen($_POST['relocate_area']) > 0) { $ra= TRUE; $relocate_area = ($_POST['relocate_area']); } else { $yrelocate_area = ' '; } if ($fn && $ln && $e && $p1 && $a1 && $c && $s && $z) { // If everything's okay.   // we'll begin by assigning the To address and message subject   $to="email@domain.com";   $subject="www.ourcompany.com - Resume Submitted";   // get the sender's name and email address   // we'll just plug them a variable to be used later   $from = stripslashes($_POST['lname'])."<".stripslashes($_POST['email']).">";   // generate a random string to be used as the boundary marker   $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";   // store the file information to variables for easier access   $tmp_name = $_FILES['filename']['tmp_name'];   $type = $_FILES['filename']['type'];   $name = $_FILES['filename']['name'];   $size = $_FILES['filename']['size'];   // here we'll hard code a text message   // again, in reality, you'll normally get this from the form submission   $message = "Name: $fname $lname\n\nEmail: $email\n\nPhone: $phone\n\nAlternate Phone: $phone2\n\nAddress 1:\n$address\n\nAddress 2: \n$address2\n$city, $state $zip $country\n\nUndergraduate Institution: $undergrad_school\n\nUndergraduate Degree: $undergrad_degree\n\nGraduate School: $grad_school\n\nGraduate Degree: grad_degree\n\nCurrent Position: $position\n\nMarket Sector: $market_sector\n\nCurrent Employer: $employer\n\nYears of Experience: $yrs_exp\n\nWilling to Relocate? $relocate\n\nRelocation Preference: $relocate_area";   // if the upload succeded, the file will exist   if (file_exists($tmp_name)){       // check to make sure that it is an uploaded file and not a system file       if(is_uploaded_file($tmp_name)){         // open the file for a binary read         $file = fopen($tmp_name,'rb');         // read the file content into a variable         $data = fread($file,filesize($tmp_name));         // close the file         fclose($file);         // now we encode it and split it into acceptable length lines         $data = chunk_split(base64_encode($data));     }       // now we'll build the message headers       $headers = "From: $from\r\n" .         "MIME-Version: 1.0\r\n" .         "Content-Type: multipart/mixed;\r\n" .         " boundary=\"{$mime_boundary}\"";       // next, we'll build the message body       // note that we insert two dashes in front of the       // MIME boundary when we use it       $message = "This is a multi-part message in MIME format.\n\n" .         "--{$mime_boundary}\n" .         "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .         "Content-Transfer-Encoding: 7bit\n\n" .         $message . "\n\n";       // now we'll insert a boundary to indicate we're starting the attachment       // we have to specify the content type, file name, and disposition as       // an attachment, then add the file content and set another boundary to       // indicate that the end of the file has been reached       $message .= "--{$mime_boundary}\n" .         "Content-Type: {$type};\n" .         " name=\"{$name}\"\n" .         //"Content-Disposition: attachment;\n" .         //" filename=\"{$fileatt_name}\"\n" .         "Content-Transfer-Encoding: base64\n\n" .         $data . "\n\n" .         "--{$mime_boundary}--\n";       // now we just send the message     @mail($to, $subject, $message, $headers);         echo "<br><p align='center' class='red'>Thank you $fname $lname. <br>Your resume has been sent successfully. <br>You will be contacted by our company shortly.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>"; }       else {         echo "<p align='center' class='red'>Please go back and try again.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>";   } } else { ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" name="form1"> <table width="760" border="0" cellspacing="0" cellpadding="0">       <tr>         <td width="95%" align="center" valign="top"><div align="left">           <p><img src="images/titles_resume.gif" alt="Submit Your Resume" width="221" height="47" hspace="10"></p>   <table width="95%"  border="0" align="center" cellpadding="4" cellspacing="2">             <tr>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Personal Information </td>               <td width="1" rowspan="2" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="1"></td>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Education</td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>First Name: </b></td>               <td><input name="fname" type="text" id="fname" maxlength="25"></td>               <td><b>Undergraduate Institution: </b></td>               <td><input name="undergrad_school" type="text" id="undergrad_school"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Last Name: </b></td>               <td><input name="lname" type="text" id="lname" maxlength="30"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Undergraduate Degree: </b></td>               <td><input name="undergrad_degree" type="text" id="undergrad_degree"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Email Address: </b></td>               <td><input name="email" type="text" id="email" maxlength="50"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Graduate Institution: </b></td>               <td><input name="grad_school" type="text" id="grad_school"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td bgcolor="#A5D9F1"><b>Phone:</b></td>               <td><input name="phone" type="text" id="phone" maxlength="12"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Graduate Degree:</b></td>               <td><input name="grad_degree" type="text" id="grad_degree"></td>             </tr>             <tr>               <td bgcolor="#A5D9F1"><b>Alt. Phone </b></td>               <td bgcolor="#A5D9F1"><input name="phone2" type="text" id="phone2" maxlength="12"></td>               <td>&nbsp;</td>               <td colspan="2" bgcolor="#329DD3" class="bold_white">Professional Information </td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Address 1:</b></td>               <td><input name="address" type="text" id="address" maxlength="60"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Current Postition:</b></td>               <td><input name="position" type="text" id="position"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Address 2: </b></td>               <td><input name="address2" type="text" id="address2" maxlength="60"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Market Sector:</b></td>               <td><select name="market_sector" size="1" class="small_text style1" id="market_sector">       <option value="NULL">Choose one...</option>       <option value="Hospitality/Hotel & Casino Projects">Hospitality/Hotel &amp; Casino       Projects</option>       <option value="Healthcare/Hospital/Lab Projects">Healthcare/Hospital/Lab Projects</option>       <option value="Retail, Mixed-use & Urban Planning Projects">Retail,       Mixed-use &amp; Urban Planning Projects</option>       <option value="K-12 Public School & Higher Education Projects">K-12       Public School &amp; Higher Education Projects</option>       <option value="Single Family, Multi-family & Hi-rise Condo Projects">Single       Family, Multi-family &amp; Hi-rise Condo Projects</option>       <option value="Commercial Office Buildings & Corporate Workplace Interiors">Commercial       Office Buildings &amp; Corporate Workplace Interiors</option>       <option value="Industrial Parks & Tilt-up Projects">Industrial Parks &amp; Tilt-up       Projects</option>       <option value="Government/Municipal Projects">Government/Municipal Projects</option>       <option value="Theme Park Projects">Theme Park Projects</option>       </select></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>City:</b></td>               <td><input name="city" type="text" id="city" maxlength="30"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Current Employer: </b></td>               <td><input name="employer" type="text" id="employer"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>State:</b></td>               <td><input name="state" type="text" id="state" maxlength="2"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Years of Experience: </b></td>               <td><input name="yrs_exp" type="text" id="yrs_exp"></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Zip Code: </b></td>               <td><input name="zip" type="text" id="zip" maxlength="5"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Are you willing to relocate? </b></td>               <td><b>                 <select name="relocate" size="1" id="relocate">           <option value="NULL" selected>Choose one...</option>           <option value="Yes">Yes</option>           <option value="No">No</option>               </select>               </b></td>             </tr>             <tr bgcolor="#A5D9F1">               <td><b>Country:</b></td>               <td><input name="country" type="text" id="country" maxlength="25"></td>               <td bgcolor="#FFFFFF">&nbsp;</td>               <td><b>Relocation Preference:<br>                 (State/Region/Country) </b></td>               <td><input name="relocate_area" type="text" id="relocate_area"></td>             </tr> <tr align="center" valign="middle" bgcolor="#FFFFFF">               <td height="1" colspan="5"><img src="images/spacer.gif" width="1" height="1"></td>             </tr>             <tr align="center" valign="middle" bgcolor="#A5D9F1">               <td colspan="5"><b>Upload your resume:                   <input type="file" name="filename">               </b></td>             </tr>             <tr align="center" valign="middle" bgcolor="#A5D9F1">               <td colspan="5"><input type="submit" name="submit" value="Submit"></td>             </tr>           </table> </form> <?php } include ('footer.tpl'); // Include the HTML footer. ?>[/code]
  17. [quote author=NevadaSam link=topic=109895.msg443397#msg443397 date=1159487668] Send an email to them requiring that they click on a link to respond and verify that it is a valid email and that they received email sent to that address. sam [/quote] I have email verification now but I have a long list that I'd like to verify. I'm tempted to purchase one of the programs that claims to do it but I don't want to waste money.
  18. Ok, so I know how to validate the string and how to check and see if the domain is really out there but is there a god way to find out if the email address really exists? I've seen some programs claiming to do this but can they really? I've tried using the fsockopen() function but it really doesn't help all that much. Does anyone know a better way?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.