Jump to content

erikjan

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

erikjan's Achievements

Member

Member (2/5)

0

Reputation

  1. Sorry, don't understand what you mean . . .
  2. Can someone please help? I built a webshop in php for wines. When a person orders wine, she/he gets automatically a mail with the order specifications etc., as does the owner of the webstore, to notify that there has been an order. Now, it seems that people having a g-mail account see the html-tags around the mail message they get. I guess it occur sbecause of the headers: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: Wijnimport Dolvinho <info@dolvinho.eu>' . "\r\n"; mail($email, $subject, $receiptMessage, $headers); mail($toAddress,$recipientSubject,$mailContent, $headers); Can somebody help me; what do I have to change in the headers? Thanks in advance!!
  3. Can someone please help. Thanks! In SELECT you can use LIKE. UNLIKE does not exist, but I would like to retrieve the following data from the database. $sql="SELECT * FROM objects WHERE object_rubric='1' AND object_artist_name LIKE 'd%' AND object_xx UNLIKE 'blabla%' AND (object_date_sold='0' OR object_sold_stay='1') ORDER BY object_artist_name ASC LIMIT $from, $max_results"; Which syntax can I use instead of UNLIKE ?? Thanks in advance!!
  4. Can someone please help me? Thank you in advance. Withe the following code I retrieve data from a database, and do stuff with it. There are three sql statements. How can I get the formatted output with only one statement? $ordernumber=("0701"); $SQL_statement="SELECT COUNT(*) AS nu, SUM(amountofboxesStunningSofia) AS Stu_Sof, SUM(amountofboxesSmokingJoe) AS Smo_Joe [etc . . .] WHERE ordernumber LIKE '$ordernumber%'"; $resultset=mysql_query($SQL_statement); ... show data for the month January ... $ordernumber=("0702"); $SQL_statement="SELECT COUNT(*) AS nu, SUM(amountofboxesStunningSofia) AS Stu_Sof, SUM(amountofboxesSmokingJoe) AS Smo_Joe [etc . . .] WHERE ordernumber LIKE '$ordernumber%'"; $resultset=mysql_query($SQL_statement); ... show data for the month Februari ... $ordernumber=("0703"); $SQL_statement2="SELECT COUNT(*) AS nu, SUM(amountofboxesStunningSofia) AS Stu_Sof, SUM(amountofboxesSmokingJoe) AS Smo_Joe [etc . . .] WHERE ordernumber LIKE '$ordernumber%'"; $resultset2=mysql_query($SQL_statement2); ... show data for the month March ...
  5. Isn't it a problem however, that not all browsers support AJAX?
  6. Dear Xinil, Thanks again, for following this thread! I will try your suggestions. Heard about AJAX, and am studying it at this right moment. Ciao.
  7. Dear Ted, Well, i'll try to explain with more details involved. The site which I built is a shop. You can order 6 different products on page 1, and choose a quantity of each of them. By clicking a button you get page 2, in which you see the order specification. On this page you fill in a billing address and/or a delivery address. Depending on the delivery address the shipping costs are calculated. By clicking on a button "order confirmation and check out", you are sent to page 3, in which you see the order specification, including calculated shipping costs plus delivery and/or billing address data. On this page you have two hidden forms, each of them having a different submit button. One is "pay by bank transfer", which goes to a page a.php, which sends an email to the customer that his/her goods will be sent after the products have been paid. The other form (number 2) goes to a banking system, (like PayPal): a file i don't have access to, but which sends an url back when the payment is succesfull. In case 2, the client - just as in case 1, has to recieve a mail that his order has been received. But, because i don't have access to the file at the banking system, i have to implement a mail to a customer when he/she submits option 2. Is that more clear?
  8. "You can't redirect to b.php, because then you'll lose the form $_POST data." However, can't i redirect b.php (with transporting the $_POST data to it) to the URL where b.php initially has to go?
  9. Dear Xinil, Oh, I think I understand what you're saying. You want the page to still submit to b.php, but also send an e-mail? Not easy unfortunately, the problem is that once you submit the form, you've lost control over the user until he goes back to that form page...but you're saying you dont' have access to b.php. IS THE EXACT POINT. Thanks for informing me about AJAX. I'll try to figure that out. Is ths really the only solution - concerning the fact that i have no access to b.php? Anyway, thanks a lot!
  10. Should I redirect b.php having the code <?php if (isset($_POST['submit2'])) { $email = "....."; $subject = "subject"; $message = "message"; mail($email, $subject, $message, "From: $email"); } ?> to the address where b.php initially goes to? Is that an option?
  11. Sorry, this cannot work either. Because: 1. the forms are totally different, so how to make one form with 2 submit buttons? This does not make sense i Think. 2. The if (isset($_POST['submit1'])) etc . . . cannot work , unless it is implemented in both a.php and b.php. But I cannot edit b.php.
  12. the solution must be something like if action is b.php then send a mail. But how do I code it?
  13. Thanks for your time, but the b.php (in form 2) is not written by me, but is running on a server to which i don't have access. So, this is not the solution I am looking for.
  14. Please can someone help me? Thanks in advance!! I have a page with two forms, form 1 and form 2. <FORM METHOD="post" ACTION="a.php" id=form1 name=form1> .................. <INPUT name="Submit" class="sendbox" type="submit" value="Pay"> </FORM> <FORM METHOD="post" ACTION="b.php" id=form2 name=form2> .................. <INPUT name="Submit" class="sendbox" type="submit" value="Pay by bank"> </FORM> How can I, when someone submits form 2, send an email using the PHP mail() function? <?php $email = "my@example.com"; $subject = "subject"; $message = "message . .."; mail($email, $subject, $message, "From: $email"); ?> So, only when form 2 is submitted the mail will be sent. If someone submits form 1, no mail is sent.
×
×
  • 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.