Jump to content

imimin

Members
  • Posts

    119
  • Joined

  • Last visited

    Never

Contact Methods

Profile Information

  • Gender
    Male
  • Location
    Colorado

imimin's Achievements

Member

Member (2/5)

1

Reputation

  1. OK, got it! Area right after email line added. I figured this out by modifying 'PFMaBiSmAd's' last code! <?php $fields = array(); $fields["Id_From"] = "ID_From:"; $fields["ID"] = "ID:"; $fields["CUT"] = "Cut:"; $fields["MAKE"] = "Make:"; $fields["CARAT"] = "Carats:"; $fields["PRICE_PC"] = "Price per carat:"; $fields["CLARITY"] = "Clarity:"; $fields["LOCATION"] = "Location:"; $fields["CERTIFICATE"] = "Certificate:"; $fields["SUP_STOCK_REF"] = "Sup Stock Ref:"; $fields["Measurements"] = "Measurments:"; $fields["Total_Depth"] = "Total Depth"; $fields["Polish"] = "Polish:"; $fields["Table_Width"] = "Table Width:"; $fields["Symmetry"] = "Symmetry:"; $fields["Crown_Height"] = "Crown Height:"; $fields["Culet"] = "Culet:"; $fields["Parillion_Depth"] = "Parillion Depth:"; $fields["Graining"] = "Graining:"; $fields["Girdle"] = "Girdle:"; $fields["Remarks"] = "Remarks:"; $fields["TotalPrice"] = "Total Price:"; // form processing code, detect if the first (expected) get parameter is present if(isset($_GET["Id_From"])){ $errors = array(); // array to hold any validation errors // validate all the expected data here ... // process the data if no validation errors if(empty($errors)){ // loop over the expected fields and form the mail message $message = ''; // define variable/empty message foreach($fields as $key => $label){ $message .= "$label: $_GET[$key]\n"; } $message = wordwrap($message, 70); if(mail('[email protected]', 'HIGH PRIORITY DIAMOND ORDER/INQUIRY!', $message)){ echo 'Additional test text here!'; // Text before diamond data here. echo "<br />"; echo "<br />"; foreach($fields as $key => $label){ $message2 .= "<label for='$key'>$label:$_GET[$key]<br />\n"; } echo $message2; echo "<br />"; echo "Thank you for your interest in our products! Your loose diamond order will be validated and checked for errors. We should be back with you within 24 to 48 hours at which time we will need to accept payment and process your order. Thank you!"; //Text after diamond data here. } else { echo "Sending Main server rejected the email!"; } } } ?>
  2. Thank you! Your code above returns text boxes instead of my extracted values (which are sent to the emails): $form = "<form method='get' action=''>\n"; foreach($fields as $key => $label){ $form .= "<label for='$key'>$label:</label>\n<input type='text' id='$key' name='$key' value=''><br />\n"; } $form .= "<input type='submit'>\n</form>"; echo $form; What I would like to do is give the customer confirmation of his request. I have tried the following with various formats (see first "echo" area for changes): <?php $fields = array(); $fields["Id_From"] = "ID_From:"; $fields["ID"] = "ID:"; $fields["CUT"] = "Cut:"; $fields["MAKE"] = "Make:"; $fields["CARAT"] = "Carats:"; $fields["PRICE_PC"] = "Price per carat:"; $fields["CLARITY"] = "Clarity:"; $fields["LOCATION"] = "Location:"; $fields["CERTIFICATE"] = "Certificate:"; $fields["SUP_STOCK_REF"] = "Sup Stock Ref:"; $fields["Measurements"] = "Measurments:"; $fields["Total_Depth"] = "Total Depth"; $fields["Polish"] = "Polish:"; $fields["Table_Width"] = "Table Width:"; $fields["Symmetry"] = "Symmetry:"; $fields["Crown_Height"] = "Crown Height:"; $fields["Culet"] = "Culet:"; $fields["Parillion_Depth"] = "Parillion Depth:"; $fields["Graining"] = "Graining:"; $fields["Girdle"] = "Girdle:"; $fields["Remarks"] = "Remarks:"; $fields["TotalPrice"] = "Total Price:"; // form processing code, detect if the first (expected) get parameter is present if(isset($_GET["Id_From"])){ $errors = array(); // array to hold any validation errors // validate all the expected data here ... // process the data if no validation errors if(empty($errors)){ // loop over the expected fields and form the mail message $message = ''; // define variable/empty message foreach($fields as $key => $label){ $message .= "$label: $_GET[$key]\n"; } $message = wordwrap($message, 70); if(mail('[email protected]', 'HIGH PRIORITY DIAMOND ORDER/INQUIRY!', $message)){ echo $message = ''; // define variable/empty message foreach($fields as $key => $label){ $message .= "$label: $_GET[$key]\n"; } echo $message; echo "Thank you for your interest in our products! Your loose diamond order will be validated and checked for errors. We should be back with you within 24 to 48 hours at which time we will need to accept payment and process your order. Thank you!"; } else { echo "Sending Main server rejected the email!"; } } } ?> but I am obviously doing something wrong in the syntax since the list prints in the customers view but the line breaks (\n) are ignored? I first just put in the "echo $message;" line and got same results. That is why I tried re-entering the code above it to try to get the formatting I wanted. Can you tell me what I am doing wrong? Thank you!
  3. Thank you! How can the list of fields be printed along with "echo "Sending Main server rejected the email!";" line? I may like to put text before and after the 'list of fields'. My final objective will be to have all this information print to my customers web page with the option to print as well as email me a copy (which we have already accomplished). Thanks!
  4. Thanks for all of your help guys! I appreciate all of the information, it will help me learn this stuff! PFMaBiSmAd, your post polished it off, thanks a lot!
  5. Do you mind showing me how to set that array up based on the info given above? Thank you!
  6. Thanks! OK, now we are getting somewhere. BUT I need to put each returned value on a line of its own? Can that be done?
  7. I tried just putting one line on like this: <?php // The message $message = $_GET['TotalPrice']; and it works fine. If I add one more line like this: <?php // The message $message = $_GET['TotalPrice']; $_GET['CARAT']; It still ONLY prints the first line? If I enclose it in anything (', ", (), etc) like: <?php // The message $message ="[/color] $_GET['TotalPrice']; $_GET['CARAT'];"[/color] it gives me an error
  8. Thanks for the reply! I tried your format and am getting the error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 4 :-) !
  9. Hello! I have the following php code: <?php // The message $message = "[request("Id_From")]\n [request("ID")]\n [request("CUT")]\n [request("MAKE")]\n [request("CARAT")]\n [request("PRICE_PC")]\n [request("CLARITY")]\n [request("LOCATION")]\n [request("CERTIFICATE")]\n [request("SUP_STOCK_REF")]\n [request("Measurements")]\n [request("Total_Depth")]\n [request("Polish")]\n [request("Table_Width")]\n [request("Symmetry")]\n [request("Crown_Height")]\n [request("Culet")]\n [request("Parillion_Depth")]\n [request("Graining")]\n [request("Girdle")]\n [request("Remarks")]\n [request("TotalPrice")]"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70); // Send mail('[email protected]', 'HIGH PRIORITY DIAMOND ORDER!', $message); ?> where I am trying to send an email to myself which will send me the listed 'requested' values. These values are to the script in the form of: http://www.somedomain.com/somepage.html?Id_From=123&ID=50250430&CUT=Round&MAKE=VG+-+G++++&CARAT=.5&PRICE_PC=5719&COLOR=D&CLARITY=VVS1&LOCATION=California+%28U.S.A.%29&CERTIFICATE=GIA&SUP_STOCK_REF=3540-6&Measurements=5.03x5.08x3.17&Total_Depth=62.7%25&Polish=V.good&Table_Width=60%25&Symmetry=Good&Crown_Height=&Culet=None&Parillion_Depth=&Graining=&Girdle=&Fluorescence=None&Remarks=&TotalPrice=2860 I am getting the error: Parse error: syntax error, unexpected T_STRING Which starts on the first line of my requested data ("[request("Id_From")]\n). Any help on this would be truely appreciated! Thank you!
  10. p2grace, are you saying I can use the above code to "receive" the data sent from the link in the format of: ???
  11. Now, is there a way to set this up in a link? Such as : <A HREF="<http://www.anysite.com . "?" . "cat=" . "red, blue,yellow">" TITLE="">TEST PAGE</A>
  12. Is there a way to write a SQL statement with a WHERE clause which contains more than one condition? Such as : SELECT prod_name FROM products WHERE cat=red, blue,yellow Thank you!
  13. Sorry! I just found an error in my DB data! The table I was pulling out was getting truncated somehow leaving out the end table tag! That would certainly cause the problem I was experiencing. Thank you for your time in this matter-I am sorry it bore no fruit !
  14. If I put plain text in this <TD> it works fine. Is there a way to reformat to make the variable data to work?
  15. "<table border=""1"" width=""100%"" cellpadding=""1"" cellspacing=""1""> <tr> <td align=""left""> Size/<BR> Approximate<BR>Age Range </td> <td align=""left""> Toddler<BR>2/3</td> <td align=""left""> Small<BR>4/5</td> <td align=""left""> Medium<BR>7/8</td> <td align=""left""> Large<BR>9/10</td> <td align=""left""> Extra Large<BR>12/14</td> </tr> <tr> <td align=""left""> Waist (inches)</td> <td align=""left"">18-22</td> <td align=""left"">20-24</td> <td align=""left"">22-26</td> <td align=""left"">24-28</td> <td align=""left"">26-28</td> </tr> <tr> <td align=""left""> Inseam (inches)</td> <td align=""left"">13</td> <td align=""left"">16</td> <td align=""left"">17</td> <td align=""left"">18</td> <td align=""left"">19</td> </tr> </table> "
×
×
  • 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.