Jump to content

heggjen

New Members
  • Posts

    6
  • Joined

  • Last visited

heggjen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The trouble is what to do here: $whole_message = '<html><body>'; $whole_message = '<table border="0" cellpadding="1" cellspacing="0" width="450"> <tr> <td colspan="2"><b>Elektronisk bestilling er registrert:</b><br><br></td> </tr>'; foreach ($_POST as $key => $val) { if ($key=="Submit_x" or ($key=="Submit_y" or ($key=="sendmail" or ($key=="recipient" or ($key=="subject"))))) { } else { if (is_array($_POST[$key])){ $whole_message .= '<tr> <td width="150" valign="top"><b>'.$key .':</b></td> <td valign="top">'. getArrayVals($_POST[$key]) .'</td> </tr>'; }else{ $whole_message .= '<tr> <td width="150" valign="top"><b>'.$key .':</b></td> <td valign="top">'. $_POST[$key] .'</td> </tr>'; } } } $whole_message .= '</table></body></html>'; if (neted_mail ($recipient,$subject,$whole_message,$headers)) { echo ' <script type="text/javascript">window.alert("Bestillinga er oversendt til kantina, og du vil få ei bekrefting når bestillinga er godteken.")</script>'; } else { echo ' <script type="text/javascript">window.alert("Feil! Noko gjekk gale, bestillinga er ikkje motteken av oss. Prøv igjen.")</script>'; } break; default: displayEmailForm (); } function getArrayVals($arr){ $layout = ""; foreach ($arr as $key => $val) { $layout .= $key . ":" . $val . ":"; } return $layout; }
  2. I may be stupid, but if you see my code, how would I use youre suggestion to get the mail to present the result like I want to? As I said, is it the connection between the collection of the information and the sending of the results I then get, in the way that I want, that is the problem. Sorry if I am repeating myself... ...and my lack of understanding...
  3. That is ok, put how do I get the result into the right place in the table, and just the results that have a value... My trouble is the connetction between the presentation of the form on the web and the presentation in the mail. It`s the php I need to get it done, that is the big problem...
  4. It`s attached to my initial post....or do you mean some other code?
  5. I would like to get a mail that don´t show the post that are empty, and where the result have a layout that makes it a litte bit more understanding than with just plain text. The result now is like: Product: Number: Product: Number: Product: Number: I would like to get it more like this, with to extra colums that can be filled in manually after ther order is printed and executed (all within a grid of some sort) : Product: Number: Price: Sum: xxxxx xx xxxxx xx xxxxx xx xxxxx xx xxxxx xx xxxxx xx Total cost: I have looked at the code from css-tricks, put do not see just yet how I would get it to work toghether with te code I have now. It`s probably real easy to do, but I can´t quite see it now...
  6. I need some help with an order form I´m trying to get to work. My first problem is to send a mail without the posts that are empty. Then I want to send the mail in html and make it look a little bit as a order form, and not just plain text. I understand just a little bit of php, and not nearly enough to get the result I want... Hope someone can help... (The content text in the form is in Norwegian, so if you don´t understand it, its understanding..... ) orderform.php
×
×
  • 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.