Jump to content

phpBeginner06

Members
  • Posts

    93
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

phpBeginner06's Achievements

Member

Member (2/5)

0

Reputation

  1. I found out how to do what I was trying to do. So if any one else would like to find out how to send a multipart/alternative email in PHP (that sends a HTML Version and also a Text Version, for email clients that do not display HTML); visit this page: http://www.webcheatsheet.com/php/send_email_text_html_attachment.php Thanks redarrow for the help. Could not get your script to work and no one else on this forum (at the time I last replied to this thread) knew how to accomplish this; so I found the answer else were.
  2. I tried the code below that "redarrow"; plus added all other needed headers and variables. I am able to send an email to an email address with this code; with all the headers included, but the body of the message does not appear. I have used html in the "$message" variable (email body). So why am I not recieveing a multi-part/alternative email; both in html and/or text? Anyone got any ideas? Here Is My Code <?php $headers = "From: \"Business Name Here\"<support@mydomain.com>\n"; $headers .= "Reply-to: \"Business Name Here\"<noresponse@mydomain.com>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\""; $message = "<div style='color:#00000f'>Hello</div>"; mail('someonesname@aol.com', 'Email Subject Here', $message, $headers); ?>
  3. no - I did not mean binarys - I meant boundries or boundry I want to be able to send both html and text email, for non-html email clients. I do not know how to set boundries so my php email script will send multi-part/alternative as it's content type. Does anyone know how to set the boundries in my script so this will work?
  4. I wrote a php script to send html email and now I would like to be able to send multi-part/alternative to email clients that can not view/display HTML. I tried to change content type to make this work; but I am not sure how I need to add the binarys to my script. <?php $to="someone@mail.com"; $reply="Reply-To: noresponse@somefakedomain.com"; $from="support@somefakedomain.com"; $subject="About Your Request....."; $message="<center><div style='border:solid 1px #800000;font-family:arial;font-size:20px;width:400px'><img src='somefakeimage.jpg' width='400px' height='100px'></img><br><br>This is a HTML email.<br><br><br><img src='somefakeimage.jpg' width='400px' height='50px'></div></center>"; @mail($to, $subject, $message, "From: $from\n$reply\nContent-Type: multipart/alternative"); ?> Any one know how I can alter my script above to get this to work?
  5. Is there any way to send variables back to orginal form page without sending them through query string or through using another form submission to post to previous page? I am not quit sure how to use sessions to send my user input values back to my orginal form and still send error query sting - I kind of understand what you are trying too tell me to do with the session, but not exactly. I still am trying to learn more about sessions; I know there like or are php cookies and I have used them before while creating a hit counter, but do not know how to implement them with this. Can you give me a little bit more detail on how I can accomplish what I am trying to do with session?
  6. I have wrote a form validation script that sends error string back to php form. My question is; what is the best way to send error strings back to orginal form, while still leaving users orginal input in form fields; while maintaining users priviate information? Right now, when an error occurs; I just have a header location to send error back to forms page using query string, with variables I have already declared. Example: header("Location: formPage.php?nameError=$error1&emailError=$error2") I know I could always catch users input in variable and send it back to form page in query string; so that it would post to user input fields, but that will leave user informtion in address bar; so that is a security risk for their priviate infomation. I also thought about sending all query strings (error & user input) throught form submission; with javascript, but I would like too try to find another way first. Any one have any ideas.....
  7. kenrbnsn that would work or you could use a header to prevent cache also. Greaser9780 and Unholy Prayer that would work also. But all I am saying is that, if you just want to transfer a string to another page; you can just use: <?php print "$mid"; ?> if there are only a few things that $mid should be able to print and not allow anything else; you could just use this above the code (i use this to validate - this is where I use $_GET): <?php // This script will redirect viewer to home page; if they type in wrong query string. @$mid = stripslashes($_GET['mid']); if ( strcasecmp($mid,"something") != 0 ) { header("Location: http://www.greatdomain.com"); exit; } ?> You may not want to use this if the $mid variable string could be more then a few different things. But for only a few things that a string could be/equal; this works great.
  8. It's alright; don't worry about it. I sent it to you maybe 2 or 3 days ago. Not that big of a deal.
  9. I do not have an example to show, because I do not use the "$_GET" method in my coding practices, but I have seen this occur in testing. No ones whining - just stating the facts - a piece of coding you said would work on your sever did not work on mine. So something was not right with your code, so I sent you a message. The only reason I PM you was because you would not reply to post; must have knew it was wrong and didn't want to admit it.
  10. Form submission alert can happen when page uses $_GET too transfer data from one page to another and the back button is used. I have never ever ever seen a browser alert when a page has a query string. You may need to test your pages a little better then; because I have. I have never had any security problems with "register_globals" on; others might. PS: Nice of you to reply to this post; although you would not reply to my message.
  11. You cannot predict what your website viewer will do. They might very well use the brower back button; it is commonly used by a majority of people, even when links are provided. If "$_GET" is suggested; it should be noted that you need to create a header to prevent page cache. Otherwise the alert will prompt; which sometimes can confuse or distress end user. When that day comes; then I may start using "$_GET"; until then, it works fine for me and most other people.
  12. I am running PHP Version 4.3.11 and my register_globals are enabled, yet I still can do this: and have this code in my page <?php print "$mid"; // you can also use "echo" instead of "print"; they have the same effect ?> and still send the "mid" variable's string to page1.php; where ever my code is placed in it. Using "$_GET" can sometimes pose a problem because of an alert the browser gives you on page with "$_GET" in it; when page is reloaded. The alert basically tells you that the page is sending form values. So that is why I stay away from "$_GET"; except when validating.
  13. Are some files not hidden from public view in a file manager. I think I tried to create a .htaccess file one time and tried to upload it; but my file manger said that this type of file was not allowed. I even typed the file name just like this ".htaccess"; that was the right way, isn't it? Even if I could create,upload,modify this type of file; will that not change all of my sub-directory files? I do not want all of my sub-directories pages to be masked; I only want one. I just hope I can find a way to do this with a php script and maybe use an include in all of the pages in my sub-directory, that I want the domain masked.
  14. They could be names of fields that are in a data table, which are within a database. They also could just be variables that are within a page. Example: Say your domain was "http://www.greatdomain.com". Say you had a page named "page1.php". In "page1.php" you might have a variable know as "$mid". If you type http://www.greatdomain.com/page1.php?mid=Hello When your "page1.php" loads; where ever you had the "$mid" variable; you will now see the word "Hello" This is, if you use this code: <?php print "$mid"; // you can also use "echo" instead of "print"; they have the same effect ?> somewhere within "page1.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.