Jump to content

eskimowned

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by eskimowned

  1. Ok - I've checked it and double checked it and I can't see anything amiss. Can someone put me out of my misery? And if your ever in Liverpool I'll buy ya a pint! :D
  2. The error I'm getting is: Parse error: syntax error, unexpected T_VARIABLE in /hsphere/local/home/designat/womeninbusiness.co.uk/PHPdocs/phpmailer/invoicemail.php on line 15
  3. Aha - I get this error now.  ??? Parse error: syntax error, unexpected T_STRING in /hsphere/local/home/designat/womeninbusiness.co.uk/PHPdocs/phpmailer/invoicemail.php on line 15 I checked it, please tell me I've done something daft like left out an ";" I hope not - a sure fire way to keep my noob status!  :D
  4. Just made those changes, the mail form works fine, but nothing seems to happen with the MYSQL - I get no error message either. [code]<?php require_once('../../Connections/Conn1.php'); ?> <?php mysql_select_db($database_Conn1, $Conn1); $query_UpdateCustInfo = "SELECT * FROM Customer"; $UpdateCustInfo = mysql_query($query_UpdateCustInfo, $Conn1) or die(mysql_error()); $row_UpdateCustInfo = mysql_fetch_assoc($UpdateCustInfo); $totalRows_UpdateCustInfo = mysql_num_rows($UpdateCustInfo); $company = $_POST['Company']; $first = $_POST['FirstName']; $last = $_POST['LastName']; $event = $_POST['Event']; $price = $_POST['Price']; mysql_query("INSERT INTO CUSTOMER (Company, First Name, Last Name, Event, price) VALUES ('$Company', '$first', '$last', '$event', '$price')"); mysql_close() or die(mysql_error()); // Grab our config settings require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/config.php'); // Grab the FreakMailer class require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = 'This is a test'; $mailer->isHTML(true); // Send the E-Mail // Body $mailer->Body = '<link href="http://www.womeninbusiness.co.uk/Templates/invoice.css" rel="stylesheet" type="text/css" /> <table width="700" border="0">   <tr>     <td><span class="normalboldstyle">Women In Business </span><span class="style16"><br />       <span class="normalboldstyle">Egerton House | 2 Tower Road | Birkenhead | Wirral | CH41 1FN <br /> Telephone 07966 308405 <br /> www.womeninbusiness.co.uk</span></span></td>     <td colspan="2"><div align="right"><img src="http://www.womeninbusiness.co.uk/images/WIBsphere.jpg" width="188" height="188" alt="WIBlogo" longdesc= /></div></td>   </tr>   <tr>     <td colspan="3"><div align="center" class="largetitlestyle">Invoice</div></td>   </tr>   <tr>     <td class="normalboldstyle">Inv No. </td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td><span class="normalboldstyle">COMPANYNAME<br /> NAMES<br /> ADDRESS<br /> POSTCODE<br /> TELEPHONE</span></td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td class="normalboldstyle">Course Name </td>     <td class="normalboldstyle">Number of People </td>     <td class="normalboldstyle"><div align="right">Cost </div></td>   </tr>   <tr>     <td class="normalboldstyle">&nbsp;</td>     <td class="normalboldstyle">&nbsp;</td>     <td class="normalboldstyle"><div align="right">&pound;</div></td>   </tr>   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td colspan="3"><div align="center"><span class="smalltitlestyle">Payment by BACs to 12-24-81 - a/c no. 06073075 or by cheque payable to Women In Business</span></div></td>   </tr> </table> <h2>WIB HTML test</h2> <p>Visit us <a href="http://www.womeninbusiness.co.uk" title="Women In Business">Women In Business.co.uk</a> for a loving community!</p> </p>Dear '. $first. ' <p>Sincerely,<br> Shauns Web test </p>'; // Add an address to send to. $mailer->AddAddress('shaun@designatedassociates.com', 'shaun'); if(!$mailer->Send()) {   echo 'There was a problem sending this mail!'; } else {   echo 'Mail sent!'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> <?php mysql_free_result($UpdateCustInfo); ?> [/code] Cheers in advance for anyones help.
  5. I'm currently trying to insert a record into a database as part of the PHPmailer. This is the code I have so far but the insert row doesn't seem to be doing anything. [code]<?php require_once('../../Connections/Conn1.php'); ?> <?php mysql_select_db($database_Conn1, $Conn1); $query_UpdateCustInfo = "SELECT * FROM Customer"; $UpdateCustInfo = mysql_query($query_UpdateCustInfo, $Conn1) or die(mysql_error()); $row_UpdateCustInfo = mysql_fetch_assoc($UpdateCustInfo); $totalRows_UpdateCustInfo = mysql_num_rows($UpdateCustInfo); $company = $_POST['Company']; $first = $_POST['FirstName']; $last = $_POST['LastName']; $event = $_POST['Event']; $price = $_POST['Price']; mysql_query("INSERT INTO CUSTOMER (Company, `First Name`, `Last Name`, Event, price) VALUES ('$Company', '$first', '$last', '$event', '$price')"); mysql_close(); // Grab our config settings require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/config.php'); // Grab the FreakMailer class require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = 'This is a test'; $mailer->isHTML(true); // Send the E-Mail // Body $mailer->Body = '<link href="http://www.womeninbusiness.co.uk/Templates/invoice.css" rel="stylesheet" type="text/css" /> <table width="700" border="0">   <tr>     <td><span class="normalboldstyle">Women In Business </span><span class="style16"><br />       <span class="normalboldstyle">Egerton House | 2 Tower Road | Birkenhead | Wirral | CH41 1FN <br /> Telephone 07966 308405 <br /> www.womeninbusiness.co.uk</span></span></td>     <td colspan="2"><div align="right"><img src="http://www.womeninbusiness.co.uk/images/WIBsphere.jpg" width="188" height="188" alt="WIBlogo" longdesc= /></div></td>   </tr>   <tr>     <td colspan="3"><div align="center" class="largetitlestyle">Invoice</div></td>   </tr>   <tr>     <td class="normalboldstyle">Inv No. </td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td><span class="normalboldstyle">COMPANYNAME<br /> NAMES<br /> ADDRESS<br /> POSTCODE<br /> TELEPHONE</span></td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td class="normalboldstyle">Course Name </td>     <td class="normalboldstyle">Number of People </td>     <td class="normalboldstyle"><div align="right">Cost </div></td>   </tr>   <tr>     <td class="normalboldstyle">&nbsp;</td>     <td class="normalboldstyle">&nbsp;</td>     <td class="normalboldstyle"><div align="right">&pound;</div></td>   </tr>   <tr>     <td>&nbsp;</td>     <td>&nbsp;</td>     <td>&nbsp;</td>   </tr>   <tr>     <td colspan="3"><div align="center"><span class="smalltitlestyle">Payment by BACs to 12-24-81 - a/c no. 06073075 or by cheque payable to Women In Business</span></div></td>   </tr> </table> <h2>WIB HTML test</h2> <p>Visit us <a href="http://www.womeninbusiness.co.uk" title="Women In Business">Women In Business.co.uk</a> for a loving community!</p> </p>Dear '. $first. ' <p>Sincerely,<br> Shauns Web test </p>'; // Add an address to send to. $mailer->AddAddress('shaun@designatedassociates.com', 'shaun'); if(!$mailer->Send()) {   echo 'There was a problem sending this mail!'; } else {   echo 'Mail sent!'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> <?php mysql_free_result($UpdateCustInfo); ?> [/code] Any help is as ever - greatly appreciated. Peace
  6. That worked - you are a legend! Thanks to everyone who gave me suggestions, this is a bit of a learning curve for me, so all of your advice is greatly appreciated. Now I know I'm pushing my luck here - but has anyone any ideas why the insert record query at the top isn't doin anything? Cheers Liverpool Eskimo
  7. Sorry - I'm an idiot - yes its the INSERT that is not working. My apologies I really need some sleep. If anyone could help that would be magic. Also changed the title. My Bad!
  8. It is spelt right, just checked and double checked. If it had been that I would have been very upset. Still no joy I'm afraid. I'm assuming it must be something to do with PHPmailer. I'm getting so frustrated with this.
  9. Two things actually: The MYSQL problem is the update statement at the top, its not updating the table, doesn't produce an error either. The other poblem I'm having with it, is displaying the form variables with the HTML body of the PHPmailer. Any help is always greatly appreciated.
  10. If there is anyone who can tell me where I'm going wrong here that would be awesome. [code]<?php require_once('../../Connections/Conn1.php'); ?> <?php mysql_select_db($database_Conn1, $Conn1); $query_UpdateCustInfo = "SELECT * FROM Customer"; $UpdateCustInfo = mysql_query($query_UpdateCustInfo, $Conn1) or die(mysql_error()); $row_UpdateCustInfo = mysql_fetch_assoc($UpdateCustInfo); $totalRows_UpdateCustInfo = mysql_num_rows($UpdateCustInfo); $company = $_POST['Company']; $first = $_POST['FirstName']; $last = $_POST['LastName']; $event = $_POST['Event']; $price = $_POST['Price']; mysql_query("INSERT INTO CUSTOMER (Company, First Name, Last Name, Event, price) VALUES ('$Company', '$first', '$last', '$event', '$price')"); mysql_close(); // Grab our config settings require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/config.php'); // Grab the FreakMailer class require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = 'This is a test'; $mailer->isHTML(true); // Send the E-Mail // Body $mailer->Body = '<img src="http://www.womeninbusiness.co.uk/images/WIBsphere.jpg" alt="WIB logo" /><br /> <h2>WIB HTML test</h2> <p>Visit us <a href="http://www.womeninbusiness.co.uk" title="Women In Business">Women In Business.co.uk</a> for a loving community!</p> <?php echo"Dear $first"?> <p>Sincerely,<br> Shauns Web test </p>'; // Add an address to send to. $mailer->AddAddress('shaun@designatedassociates.com', 'shaun'); if(!$mailer->Send()) {   echo 'There was a problem sending this mail!'; } else {   echo 'Mail sent!'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> <?php mysql_free_result($UpdateCustInfo); ?> [/code] Any help anyone can offer, is as always greatly appreciated.
  11. Cheers for the help, I made the suggested change but this time nothing happened, the email came through but the php variable didn't come through. doh! I still cant get it to update the table either. Sorry to be a pain, but if anyone can shed any light on this it would be quality.
  12. Please help - I'm so stuck! Apologies if this appears to be a noobish question.
  13. I've just done the suggested change and this is what comes out in the email: WIB HTML test Visit us Women In Business.co.uk for a loving community! ";?> Sincerely, Shauns Web test DOH! Any sugggestions would be greatly appreciated. Peace
  14. can anyone help? It would be muchos appreciated.
  15. [code]<?php require_once('../../Connections/Conn1.php'); ?> <?php mysql_select_db($database_Conn1, $Conn1); $query_UpdateCustInfo = "SELECT * FROM Customer"; $UpdateCustInfo = mysql_query($query_UpdateCustInfo, $Conn1) or die(mysql_error()); $row_UpdateCustInfo = mysql_fetch_assoc($UpdateCustInfo); $totalRows_UpdateCustInfo = mysql_num_rows($UpdateCustInfo); $company = $_POST['Company']; $first = $_POST['FirstName']; $last = $_POST['LastName']; $event = $_POST['Event']; $price = $_POST['Price']; mysql_query("INSERT INTO CUSTOMER (Company, `First Name`, `Last Name`, Event, price) VALUES ('$Company', '$first', '$last', '$event', '$price')"); mysql_close(); // Grab our config settings require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/config.php'); // Grab the FreakMailer class require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = 'This is a test'; $mailer->isHTML(true); // Send the E-Mail // Body $mailer->Body = '<img src="http://www.womeninbusiness.co.uk/images/WIBsphere.jpg" alt="WIB logo" /><br /> <h2>WIB HTML test</h2> <p>Visit us <a href="http://www.womeninbusiness.co.uk" title="Women In Business">Women In Business.co.uk</a> for a loving community!</p> <?php "Dear ". $first. "<br/>";?> <p>Sincerely,<br> Shauns Web test </p>'; // Add an address to send to. $mailer->AddAddress('shaun@designatedassociates.com', 'shaun'); $mailer->AddAddress('darren.wirth@designatedassociates.com', 'Darren'); if(!$mailer->Send()) {   echo 'There was a problem sending this mail!'; } else {   echo 'Mail sent!'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> <?php mysql_free_result($UpdateCustInfo); ?> [/code] I've also included a copy of the code to show the update record query, thats not working either, DOH! Any help anyone can give me on that as well would be awesome. Cheers everyone!
  16. [code]<?php $company = $_POST['Company']; $first = $_POST['FirstName']; $last = $_POST['LastName']; $event = $_POST['Event']; $price = $_POST['Price']; // Grab our config settings require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/config.php'); // Grab the FreakMailer class require_once($_SERVER['DOCUMENT_ROOT'].'/PHPdocs/phpmailer/MailClass.inc'); // instantiate the class $mailer = new FreakMailer(); // Set the subject $mailer->Subject = 'This is a test'; $mailer->isHTML(true); // Send the E-Mail // Body $mailer->Body = '<img src="http://www.womeninbusiness.co.uk/images/WIBsphere.jpg" alt="WIB logo" /><br /> <h2>WIB HTML test</h2> <p>Visit us <a href="http://www.womeninbusiness.co.uk" title="Women In Business">Women In Business.co.uk</a> for a loving community!</p> <?php "Dear ". $first. "<br/>";?> <p>Sincerely,<br> Shauns Web test </p>'; // Add an address to send to. $mailer->AddAddress('shaun@designatedassociates.com', 'shaun'); $mailer->AddAddress('darren.wirth@designatedassociates.com', 'Darren'); if(!$mailer->Send()) {   echo 'There was a problem sending this mail!'; } else {   echo 'Mail sent!'; } $mailer->ClearAddresses(); $mailer->ClearAttachments(); ?> [/code] The bit I can't get to display is the <?php "Dear ". $first. "<br/>";?> Any ideas? Any help is always greatly appreciated
  17. Quality - Cheers geezer! I think I know how to get that to work. Just a quick question about the mail form - using PHPmailer how do you show form vairiables as part of the HTML body? Any help on that would be sweet. Cheers in advance.  PEACE
  18. Excellent advice gents - I was hoping for a little more than "yes this can be done" :D. I'll clarify it a little better, I was probably a little vague: all I want to do is when the submit button is clicked it inserts a record into the database and email some information. How can this be done. Or would I do it by updating the database within the mail script the form action sends to. Any help anyone can give me is always greatly appreciated.
  19. Is it possible to have multiple form actions. I want to use a form to update to MYSQL database and mail information, once the submit button is pressed. Is this possible?
  20. Hello - Please somebody help me or point me in the right direction! I'll love ya all forever.
  21. Ok - I'll try it a little differently Is it possible to submit an update record and email document on the same button?
  22. Anyone? What about sending formated mail from a form. ie. the form variables get delivered to ricipient as a HTML mail doc.
  23. Ok - so heres my problem. I have a booking system that I have created using a mixture of MYSQL and PHP. Essentially you go to an event, if you would like to attend you click the book now button. From there the event details are taken accross and you fill out an online form to confirm. Now here's the problem I have - When you confirm this booking I need the information of event and customer to update to a table and send an invoice via email. How do I update table and mail at the same time when the submit button is pressed? How can formated HTML emails be sent via PHP? Any help is always greatly appreciated.
×
×
  • 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.