Jump to content

sblake161189

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

About sblake161189

  • Birthday 11/16/1989

Profile Information

  • Gender
    Male
  • Location
    Leeds

sblake161189's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Guys, I am normally switched on when it comes to PHP mysql_query's but for some reason I cannot work this one out. Its probably something daft! I have a SELECT * query's which then displays results in the table. But for some reason it isnt showing every result (i.e. some properties are missing). I have worked out they are the properties where there is no customer, orderdetail or payment linked to it. I would like it to show ALL results regardless of wether a customer, order or payment is attached it. Here is my code: <?php // Find All Properties $resulta = mysql_query("SELECT * FROM yea_properties ORDER BY PROPERTY_ID DESC"); if(mysql_num_rows($resulta)==0) { echo "No properties in database."; } else { ?> <table width="990" border="0"> <tr> <td><strong>Property ID</strong></td> <td><strong>Address</strong></td> <td><strong>Created</strong></td> <td><strong>Customer</strong></td> <td><strong>Order</strong></td> </tr> <?php while($property=mysql_fetch_array($resulta)){ $propertyID = $property['PROPERTY_ID']; // Find Details of Prop/Customer Link $resultb = mysql_query("SELECT * FROM yea_link_prop_cust WHERE PROPID = '$propertyID'"); $link = mysql_fetch_array($resultb); $userID = $link['USERID']; // Find Details of Customer $resultc = mysql_query("SELECT * FROM yea_customers WHERE USERID = '$userID'"); while($customer=mysql_fetch_array($resultc)){ // Find Details of Latest Order with Property $resultd = mysql_query("SELECT * FROM yea_orderdetails WHERE DetailPropertyID = '$propertyID' ORDER BY DetailOrderID DESC Limit 0,1"); while($order=mysql_fetch_array($resultd)){ $orderID = $order['DetailOrderID']; // Find Details of Payment $resulte = mysql_query("SELECT * FROM yea_payments WHERE orderID = '$orderID'"); $payment = mysql_fetch_array($resulte); $paymentID = $payment['paymentID']; ?> <tr> <td><a href="view-property.php?propertyID=<?php echo $propertyID; ?>">View Property #<?php echo $propertyID; ?></a></td> <td><?php echo $property['ADDRESS_1']; ?> <?php echo $property['ADDRESS_2']; ?>, <?php echo $property['ADDRESS_3']; ?>, <?php echo $property['TOWN']; ?>, <?php echo $property['POSTCODE1']; ?> <?php echo $property['POSTCODE2']; ?></td> <td><?php echo $property['CREATE_DATE']; ?></td> <td><a href="view-customer.php?userID=<?php echo $customer['USERID']; ?>">Customer #<?php echo $customer['USERID']; ?> (<?php echo $customer['FIRST_NAME']; ?> <?php echo $customer['LAST_NAME']; ?>)</a></td> <td><a href="view-order.php?orderID=<?php echo $orderID; ?>&paymentID=<?php echo $paymentID; ?>">View Order #<?php echo $orderID; ?></a></td> </tr> <?php }}}} ?> </table> Any help would be much appreciated
  2. Just incase any of you are confused... The reason it didnt like <div id="description"> was because when it was looking for getElementByID('description'); it was finding the META 'description' tag rather than my DIV. I have changed it in the above code to <div id="blogdescription"> as this was then different to the META. Changing that and the above code made it work
  3. Hi Guys, Thanks for all your help... I have found the following works... it might not be the tidiest solution, but it does the job... <?php $url="http://www.example.com?id=1"; $html = file_get_contents($url); $doc = new DOMDocument(); @$doc->loadHTML($html); $doc = $doc->getElementById('blogdescription'); $images = $doc->getElementsByTagName('img'); foreach ($images as $image) { echo $image->getAttribute('src')."<br/>"; } ?> Cheers
  4. Hi there, Nope its the only div with that ID as per W3C validations... Here is the code within the page its looking at... <div id="description"> <?php echo($blog['description']); ?> </div> Although its a foreach it still should find just that one instance of the <div id="description"> in there. Thanks for your help :-)
  5. Thanks for your reply... I have tried that but unless I am being stupid it doesnt find the <div id="description"> <?php $url="http://www.example.com?id=1"; $html = file_get_contents($url); $doc = new DOMDocument(); @$doc->loadHTML($html); $divs = $doc->getElementByID('description'); foreach ($divs as $div) { echo "Found the description div <br />"; } ?> It finds nothing and appears blank...
  6. Hi All, I have the following code to find all the image src's for all the images within a current page. However I would like to adapt it so it only looks within the <div id="description">. Any ideas on how to do that? I have tried Googling with not much look. <?php $url="http://www.example.com?id=1"; $html = file_get_contents($url); $doc = new DOMDocument(); @$doc->loadHTML($html); $images = $doc->getElementsByTagName('img'); foreach ($images as $image) { echo $image->getAttribute('src')."<br/>"; } ?> Cheers Guys!
  7. Hi All, I have a form which POSTs data through to PHP, it then places this on a HTML mail and then emails the company. I then have two attachment fields on the form, one for their CV and the other for some sort of ID. The attachments appear on the HTML email but when you try and open them or download and open them they come up with an error as though they are corrupt. However the odd thing is if I open it on my iPhone the attachments work perfect. Its not just my PC at fault as it doesnt work on many computers/OS's. The actual PHP attachment code is below: <?php $unid = md5(time()); for($i=0;$i<count($_FILES["fileAttach"]["name"]); $i++) { if($_FILES["fileAttach"]["name"][$i] != "") { $filename = $_FILES["fileAttach"]["name"][$i]; $attachment = chunk_split(base64_encode(file_get_contents($_FILES["fileAttach"]["tmp_name"][$i]))); $mailheader .= "--" . $unid . "\n"; $mailheader .= "Content-Type: multipart/mixed; name=" . $filename . "\n"; $mailheader .= "Content-Transfer-Encoding: base64"."\n"; $mailheader .= "Content-Disposition: attachment; filename=" . $filename . "\n"; $mailheader .= $attachment; } } ?> What am I doing wrong. More code can be provided if needed. Cheers in advance!
  8. Hi Guys, Please can someone shred some light on what im doing wrong. Upon form submission it takes you to the success page. It then grabs the data, emails it through to the owner as a HTML email and then attaches 2 file attachments. The issue I am having is the attachments appear BUT they will not open. Its as though the files are corrupt. Part of the form is as follows: CV: <input name="fileAttach[]" type="file" class="field" /> ID: <input name="fileAttach[]" type="file" class="field" /> The PHP is as follows: (please ignore most of the HTML body content from the email, the attachment bit is at the bottom) <?php // Grab Data from Form if(isset($_POST['submit'])) { // Personal Information $surname = mysql_real_escape_string($_POST['surname']); $firstname = mysql_real_escape_string($_POST['firstname']); $telephone = mysql_real_escape_string($_POST['telephone']); $mobile = mysql_real_escape_string($_POST['mobile']); $email = mysql_real_escape_string($_POST['email']); $address = mysql_real_escape_string($_POST['address']); $postcodep1 = mysql_real_escape_string($_POST['postcodep1']); $postcodep2 = mysql_real_escape_string($_POST['postcodep2']); $dob_dd = mysql_real_escape_string($_POST['dob_dd']); $dob_mm = mysql_real_escape_string($_POST['dob_mm']); $dob_yyyy = mysql_real_escape_string($_POST['dob_yyyy']); // Next of Kin $nextkinname = mysql_real_escape_string($_POST['nextkinname']); $nextkintel = mysql_real_escape_string($_POST['nextkintel']); // Availability $days_mon = mysql_real_escape_string($_POST['days_mon']); $days_tue = mysql_real_escape_string($_POST['days_tue']); $days_wed = mysql_real_escape_string($_POST['days_wed']); $days_thu = mysql_real_escape_string($_POST['days_thu']); $days_fri = mysql_real_escape_string($_POST['days_fri']); $days_sat = mysql_real_escape_string($_POST['days_sat']); $days_sun = mysql_real_escape_string($_POST['days_sun']); $availability_am = mysql_real_escape_string($_POST['availability_am']); $availability_pm = mysql_real_escape_string($_POST['availability_pm']); $availability_allday = mysql_real_escape_string($_POST['availability_allday']); $availability_requirements = mysql_real_escape_string($_POST['availability_requirements']); // Experience $experience = mysql_real_escape_string($_POST['experience']); // Rates $rate = mysql_real_escape_string($_POST['rate']); $rate_specific = mysql_real_escape_string($_POST['rate_specific']); // Employer Ref $employrefname = mysql_real_escape_string($_POST['employrefname']); $employrefcomp = mysql_real_escape_string($_POST['employrefcomp']); $employreftel = mysql_real_escape_string($_POST['employreftel']); $employrefadd = mysql_real_escape_string($_POST['employrefadd']); // Personal Ref $persrefname = mysql_real_escape_string($_POST['persrefname']); $persreftel = mysql_real_escape_string($_POST['persreftel']); $persrefadd = mysql_real_escape_string($_POST['persrefadd']); // Extra Information $allergy = mysql_real_escape_string($_POST['allergy']); $allergy_details = mysql_real_escape_string($_POST['allergy_details']); $drive = mysql_real_escape_string($_POST['drive']); $car = mysql_real_escape_string($_POST['car']); $criminal = mysql_real_escape_string($_POST['criminal']); $criminal_details = mysql_real_escape_string($_POST['criminal_details']); $howlongworkuk = mysql_real_escape_string($_POST['howlongworkuk']); $police_check = mysql_real_escape_string($_POST['police_check']); $right2work = mysql_real_escape_string($_POST['right2work']); $right2workna = mysql_real_escape_string($_POST['right2workna']); //*** Uniqid Session ***// $strSid = md5(uniqid(time())); // Email Options $subject = "XXX Job Application"; $to = "test@test.com"; $mailheader = ""; $mailheader .= "From: $email" . "\r\n"; // Applicants copy $mailheader .= "BCc: $email" . "\r\n"; $mailheader .= "MIME-Version: 1.0\n"; $mailheader .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n"; $mailheader .= "This is a multi-part message in MIME format.\n"; $mailheader .= "--".$strSid."\n"; $mailheader .= "Content-type: text/html; charset=utf-8\n"; $mailheader .= "Content-Transfer-Encoding: 7bit\n\n"; // Message Content $body = '<html><head><style media="all" type="text/css">.table{background-color:#d8f0f8; cellpadding:3; cellspacing:10; border:10; width:625; bordercolor:#d8f0f8; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; padding:5;} .field{margin-left: 5px; margin-right:5px; padding:8px;}</style></head><body>'; $body .= '<table class="table"> <tr> <td colspan="5"> <h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 10px;">Cleaner Details</h2> </td></tr> <tr> <td></td> <td width="50%" >NAME:</td> <td></td> <td width="50%" >DATE OF BIRTH:</td> <td></td> </tr> <tr class="input"> <td></td> <td bgcolor="#FFFFFF" bordercolor="#666666" class="field">' . strip_tags($_POST['firstname']) . ' ' . strip_tags($_POST['surname']) . '</td> <td></td> <td bgcolor="#FFFFFF" bordercolor="#666666" class="field">' . strip_tags($_POST['dob_dd']) . '/' . strip_tags($_POST['dob_mm']) . '/' . strip_tags($_POST['dob_yyyy']) . '</td> <td></td> </tr> <tr class="field"> <td></td> <td>ADDRESS:</td> <td></td> <td>TELEPHONE:</td> <td></td> </tr> <tr class="input"> <td></td> <td rowspan="3" bgcolor="#FFFFFF" bordercolor="#666666" class="field">' . strip_tags($_POST['address']) . ' ' . strip_tags($_POST['postcodep1']) . ' ' . strip_tags($_POST['postcodep2']) . '</td> <td></td> <td bgcolor="#FFFFFF" bordercolor="#666666" class="field">' . strip_tags($_POST['telephone']) . '</td> <td></td> </tr> <tr class="input"> <td></td> <td></td> <td>MOBILE:</td> <td></td> </tr> <tr class="input"> <td></td> <td></td> <td bgcolor="#FFFFFF" bordercolor="#666666" class="field">' . strip_tags($_POST['mobile']) . '</td> <td></td> </tr> <tr > <td></td> <td colspan=3>EMAIL:</td> <td></td> </tr> <tr > <td></td> <td colspan=3 bgcolor=#FFFFFF bordercolor=#666666 class="field">' . strip_tags($_POST['email']) . '</td> <td></td> </tr> <tr> <td colspan=5><h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 5px; padding-top: 10px;">EMERGENCY CONTACT INFORMATION</h2></td> </tr> <tr> <td colspan=5 class="field"><hr size=1 /></td> </tr> <tr> <td></td> <td >NAME:</td> <td></td> <td >TELEPHONE:</td> <td></td> </tr> <tr > <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 class="field">' . strip_tags($_POST['nextkinname']) . '</td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 class="field">' . strip_tags($_POST['nextkintel']) . '</td> <td></td> </tr> <tr> <td colspan=5><h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 5px; padding-top: 10px;">EXPERIENCE</h2></td> </tr> <tr> <td colspan=5><hr size=1 /></td> </tr> <tr> <td></td> <td colspan="3" bgcolor=#FFFFFF bordercolor=#666666 class="field">' . strip_tags($_POST['experience']) . '</td> <td></td> </tr> <tr> <td></td> <td>CLEANERS RATE:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 class="field">' . strip_tags($_POST['rate']) . ' ' . strip_tags($_POST['rate_specific']) . '</td> <td></td> </tr> <tr> <td colspan=5><hr size=1 /></td> </tr> <tr> <td colspan=5><h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 5px; padding-top: 10px;">AVAILABILITY</h2></td> </tr> <tr> <td></td> <td >WEEKDAYS:</td> <td></td> <td >SPECIFIC REQUIREMENTS:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top >Monday: ' . strip_tags($_POST['days_mon']) . '<br /> Tuesday: ' . strip_tags($_POST['days_tue']) . '<br /> Wednesday: ' . strip_tags($_POST['days_wed']) . '<br /> Thursday: ' . strip_tags($_POST['days_thu']) . '<br /> Friday: ' . strip_tags($_POST['days_fri']) . '<br /> Saturday: ' . strip_tags($_POST['days_sat']) . '<br /> Sunday: ' . strip_tags($_POST['days_sun']) . '<br /> <br /> I am available on the above days in the:<br /> <br /> Morning: ' . strip_tags($_POST['availability_am']) . '<br /> Afternoon: ' . strip_tags($_POST['availability_pm']) . '<br /> All Day: ' . strip_tags($_POST['availability_allday']) . '<br /> </td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['availability_requirements']) . '</td> <td></td> </tr> <tr> <td colspan=5><hr size=1 /></td> </tr> <tr> <td colspan=5><h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 5px; padding-top: 10px;">REFERENCES</h2></td> </tr> <tr> <td></td> <td><b>EMPLOYER REFERENCE</b></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>NAME:</td> <td></td> <td>COMPANY:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['employrefname']) . '</td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['employrefcomp']) . '</td> <td></td> </tr> <tr> <td></td> <td>ADDRESS:</td> <td></td> <td>TELEPHONE:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['employrefadd']) . '</td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['employreftel']) . '</td> <td></td> </tr> <tr> <td></td> <td><b>PERSONAL REFERENCE</b></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>NAME:</td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['persrefname']) . '</td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td>ADDRESS:</td> <td></td> <td>TELEPHONE:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['persrefadd']) . '</td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top>' . strip_tags($_POST['persreftel']) . '</td> <td></td> </tr> <tr> <td colspan=5><hr size=1 /></td> </tr> <tr> <td colspan=5><h2 style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.3em; margin: 0; text-transform: uppercase; padding-bottom: 5px; padding-top: 10px;">OTHER INFORMATION</h2></td> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top> Police Check Complete: ' . strip_tags($_POST['police_check']) . '<br /> Criminal Convictions: ' . strip_tags($_POST['criminal']) . ' ' . strip_tags($_POST['criminal_details']) . '<br /> Right to Work: ' . strip_tags($_POST['right2work']) . '<br /> Not Applicable: ' . strip_tags($_POST['right2workna']) . '<br /> Worked in the UK: ' . strip_tags($_POST['howlongworkuk']) . '<br /> </td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top> Allergies: ' . strip_tags($_POST['allergy']) . ' ' . strip_tags($_POST['allergy_details']) . '<br /> Drive? ' . strip_tags($_POST['drive']) . '<br /> Car? ' . strip_tags($_POST['car']) . ' </td> <td></td> </tr> <tr> <td></td> <td>SIGNED BY CLEANER:</td> <td></td> <td>DATE:</td> <td></td> </tr> <tr> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top> X </td> <td></td> <td bgcolor=#FFFFFF bordercolor=#666666 valign=top> </td> <td></td> </tr> </tr> <tr><td></td><td></td><td></td></tr> </table>'; $body .= "</body></html>"; // Upload Attachments for($i=0;$i<count($_FILES["fileAttach"]["name"]);$i++) { if($_FILES["fileAttach"]["name"][$i] != "") { $mailheader .= $body ."\n\n"; $FilesName = $_FILES["fileAttach"]["name"][$i]; $Content = chunk_split(base64_encode(file_get_contents($_FILES["fileAttach"]["tmp_name"][$i]))); $mailheader .= "--".$strSid."\n"; $mailheader .= "Content-Type: application/octet-stream; name=\"".$FilesName."\"\n"; $mailheader .= "Content-Transfer-Encoding: base64\n"; $mailheader .= "Content-Disposition: attachment; filename=\"".$FilesName."\"\n\n"; $mailheader .= $Content."\n\n"; } } // End of Email Content > Display Message echo "Thank you. Your application was submitted to us successly. We review all applications carefully and we may contact you shortly."; // Attempt to Send Email mail($to, $subject, $body, $mailheader); } else { echo "Application Failed. Unfortunatley, there was a problem with your application and it was not submitted. Please try again later or alternativley please contact us."; } ?> Any help would be much appreicated. Thanks guys! Sam
  9. Thanks guys - it all works B-E-A-UTIFULLY!
  10. Hi All, I am using an eBay API to display some results in a table on a PHP page. I am currently using the following code to display 'Time Left' until the auction ends. <?php echo $item->sellingStatus->timeLeft ?> And this outputs something similar to "P0DT0H4M14S" ie. 0 Days, 0 Hours, 4 Mins, 14 Seconds. Is there any easy way to make this look more normal like 4m, 4s - using substr() doesnt work becuase it depends on whether the values are single or double figure values... Any ideas im stuck... ive read somewhere its ISO-8601... Cheers
  11. Webstyles that works mint, thank you very much!
  12. Hi All, I think im having one of those days when you want to rip your hair out... My problem is... I want to produce the total number of results in my table that match a particular query... that query in English is... calculate the total number of records where field category = C Category... When im in phpMyadmin and perform a search it finds all the records that have the value of C Category in the category field. If I then choose 'show php code' i get: $sql = "SELECT * FROM `staff` WHERE `category` = \'C Category\' LIMIT 0, 30 "; In my php document, i use... <?php include ('config.php'); $sql="SELECT * FROM `staff` WHERE `category` = \'C Category\' LIMIT 0, 30 "; $result=mysql_query($sql); $num_rows = mysql_num_rows($result); echo $num_rows; ?> But I get a blank page... what am I doing wrong? Cheers
  13. Hi Guys, I have a HTML form which posts to a PHP mail script page. This data then emails to the company email address. I have two file attachments on my form: CV and Photo ID How do I integrate my php mail script to upload and then email these TWO files as TWO attachements on the email? $fileatt_cv $fileatt_id I have tried a few methods that I found on Google but they dont work <?php // Grab Data from Form if(isset($_POST['submit'])) { // Personal Information $surname = mysql_real_escape_string($_POST['surname']); $firstname = mysql_real_escape_string($_POST['firstname']); $telephone = mysql_real_escape_string($_POST['telephone']); $mobile = mysql_real_escape_string($_POST['mobile']); $email = mysql_real_escape_string($_POST['email']); $address = mysql_real_escape_string($_POST['address']); $postcodep1 = mysql_real_escape_string($_POST['postcodep1']); $postcodep2 = mysql_real_escape_string($_POST['postcodep2']); $dob_dd = mysql_real_escape_string($_POST['dob_dd']); $dob_mm = mysql_real_escape_string($_POST['dob_mm']); $dob_yyyy = mysql_real_escape_string($_POST['dob_yyyy']); // Next of Kin $nextkinname = mysql_real_escape_string($_POST['nextkinname']); $nextkintel = mysql_real_escape_string($_POST['nextkintel']); // Availability $days_mon = mysql_real_escape_string($_POST['days_mon']); $days_tue = mysql_real_escape_string($_POST['days_tue']); $days_wed = mysql_real_escape_string($_POST['days_wed']); $days_thu = mysql_real_escape_string($_POST['days_thu']); $days_fri = mysql_real_escape_string($_POST['days_fri']); $days_sat = mysql_real_escape_string($_POST['days_sat']); $days_sun = mysql_real_escape_string($_POST['days_sun']); $availability_am = mysql_real_escape_string($_POST['availability_am']); $availability_pm = mysql_real_escape_string($_POST['availability_pm']); $availability_allday = mysql_real_escape_string($_POST['availability_allday']); $availability_requirements = mysql_real_escape_string($_POST['availability_requirements']); // Experience $experience = mysql_real_escape_string($_POST['experience']); // File Attachments $fileatt_cv = mysql_real_escape_string($_POST['fileatt_cv']); $fileatt_id = mysql_real_escape_string($_POST['fileatt_id']); // Rates $rate = mysql_real_escape_string($_POST['rate']); $rate_specific = mysql_real_escape_string($_POST['rate_specific']); // Employer Ref $employrefname = mysql_real_escape_string($_POST['employrefname']); $employrefcomp = mysql_real_escape_string($_POST['employrefcomp']); $employreftel = mysql_real_escape_string($_POST['employreftel']); $employrefadd = mysql_real_escape_string($_POST['employrefadd']); // Personal Ref $persrefname = mysql_real_escape_string($_POST['persrefname']); $persreftel = mysql_real_escape_string($_POST['persreftel']); $persrefadd = mysql_real_escape_string($_POST['persrefadd']); // Extra Information $allergy = mysql_real_escape_string($_POST['allergy']); $allergy_details = mysql_real_escape_string($_POST['allergy_details']); $drive = mysql_real_escape_string($_POST['drive']); $car = mysql_real_escape_string($_POST['car']); $criminal = mysql_real_escape_string($_POST['criminal']); $criminal_details = mysql_real_escape_string($_POST['criminal_details']); $howlongworkuk = mysql_real_escape_string($_POST['howlongworkuk']); $police_check = mysql_real_escape_string($_POST['police_check']); $right2work = mysql_real_escape_string($_POST['right2work']); $right2workna = mysql_real_escape_string($_POST['right2workna']); // Email Options $subject = "Test Company - Job Application"; $to = "test@test.com"; $mailheader = "From: $email" . "\r\n"; $mailheader .= 'MIME-Version: 1.0' . "\r\n"; $mailheader .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Applicants copy $mailheader .= "BCc: $email" . "\r\n"; // Message Content $body .= 'Message'; // End of Email Content > Display Message echo "Thank you. Your application was submitted to us successly. We review all applications carefully and we may contact you shortly."; // Attempt to Send Email mail($to, $subject, $body, $mailheader); } else { echo "Application Failed. Unfortunatley, there was a problem with your application and it was not submitted. Please try again later or alternativley please contact us."; } ?> Thanks in advanced.
  14. Sorted Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ /sites/0.php?BranchName=$1 [QSA] Yet again, thanks again for your help!
×
×
  • 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.