Jump to content

gsmith

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by gsmith

  1. No, the users shouldn't see that.They'll see any HTML tags that are generated from your php code, but no php code itself on that page.
  2. gsmith

    Crazy with insert

    I'm currently not too familiar for dealing with MySQL databases, so I might not be able to help you much with that portion. But the above part of your code confuses me.If you're getting a variable from a Form text box (the e-mail) you should set a variable and then write to the database using the variable. Set the variable like this:$email = $_POST['textboxname']; (this is assuming your Form uses the Post method)
  3. gsmith

    Crazy with insert

    what is in your AddEmail.php file already? Code of anything you already have will be helpful so we can just help you with what's missing.
  4. PHP runs when you submit something to the server. To do what you're asking - similar to what's here on W3Schools - would require something like javascript as far as I know. I'd suggest asking this question in the Javascript forum.
  5. I don't understand your question. Can you explain further, or provide some code samples of what you do have so far?
  6. gsmith

    Sending forms

    The password will work just like all the other input fields. Although, being that it's a password, it would probably be more standard to use <input type="password"> instead of <input type="text">. That way the password characters won't actually be displayed on-screen while being typed in....just in case someone is looking over the shoulder of your user.
  7. any other form input that you have, you'll be able to capture into a variable using:$variablename = $_POST['form_item_name'];Then you can create the message of your e-mail by putting them all together:$message="$name \n$email \n$variablename1 \n$variablename2 \n";(the \n just signifies to write a newline)
  8. <?php$to = "someone@somehost.com";$subject = "Submission";$replysubject = 'Email recived';$name = $_POST['name'];$email = $_POST['email'];$message = $_POST['message'];$headers = "From: $email" . "\r\n" . "Reply-To: $email" . "\r\n" . 'X-Mailer: PHP/' . phpversion();$replyHeaders = "From: $to" . "\r\n" . "Reply-To: $to" . "\r\n" . 'X-Mailer: PHP/' . phpversion();//Origonal messagemail($to, $subject, $message, $headers);//Return Message$reply = "Hello $name,Thankyou for your email, we will get back to you as soon as possible.Your Message was as follows:$message";mail($email, $replysubject, $reply, $replyHeaders);?> I finally had time to try this on the server I use. The code I've put above worked for me in the exact way you seem to be looking for.
  9. Not on the last line, on the first few lines - the variable declarations:<?php$to = 'youremail@example.com';$subject = 'the subject';$replysubject = 'Email recived'; Try changing those single quote to double quotes.
  10. Yes, that makes sense.I just realized that in the latest code segment you're going off of, the variables: $to, $subject, and $replysubject are all in single quotes --> ' 'Try changing those single quotes to double quotes --> " "See if that helps.
  11. What do you mean by "no original email"? And by "title" are referring to the subject?
  12. that's because you're using the same $headers.Change the last line to:mail($to, $replysubject, $reply, $replyHeaders);
  13. I beileve your Forms names might be different than what is in your $_POST command in that latest script. If I remember correctly, the message field in the form was named "Message", which would mean you need to use$_POST['Message'];instead of $_POST['message'];
  14. nevermind - reread your post and it makes sense now.Try adding the same headers to the second e-mail and see if that works...change mail($user_email,$user_subject,$user_message); to mail($user_email,$user_subject,$user_message,$headers);
  15. are you receiving the e-mail that's supposed to be sent to you?
  16. Sorry I forgot to mention that! The \ is an escape character for the quotes in the middle of a string. So, if you change the first line I told you to add, it needs to change to:$user_email = $_POST["Email"];Let me know if that works. Otherwise, actually seeing your code up to that point might still be helpful. (You could still change out your e-mail address but leave everything else the same)
  17. you could try taking out the " " in the $_POST part: $user_email = $_POST[\"Email\"]; Or, look at lines BEFORE that. Often a parse errorr like you're getting is because of an extra (or missing) " BEFORE the line the error actually references. Check to make sure you don't have a missing quote somewhere.If you want, post your code up to that line and I'll see if I can find the error too.
  18. Full name: Greg SmithBirth date(dd/mm/yyyy): 7/20/1977Gender: MaleZodiacal sign: CancerCountry of residance: USACity of residance: A little town in NorthWestern MinnesotaAdditional comments: Been here for a little bit. Completely self taught PHP from W3Schools - started on the forums asking questions for help - now I'm answering questions myself!
  19. add a line after the $my_email line: $user_email = "$_POST[\"Email\"]"; Then, in this section: // This line prevents a blank form being sentwhile(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $value\n\n";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}$message = $message . "-- \nThank you for using FormToEmail from http://FormToEmail.com";$message = stripslashes($message);$subject = "FormToEmail Comments";$headers = "From: " . $_POST['Email'] . "\n" . "Return-Path: " . $_POST['Email'] . "\n" . "Reply-To: " . $_POST['Email'] . "\n";mail($my_email,$subject,$message,$headers); add: $user_message = "Thank you $_POST[\"Name\"] for your email. Whatever else you would like to tell them in the email.";$user_subject = "Subject of email you want sent to user";mail($user_email,$user_subject,$user_message);
  20. There may be a better way, but this is how I do it....Read your first file into an array. Then overwrite the original file while inserting the new line you want. <?$linetoinsert=3;//Get new line$z=file("2.txt");///Put original file into array$old=file("1.txt");//Rewrite the file$x=fopen("1.txt", "w");$old[$linetoinsert]=$z;foreach($old as $value){ fwrite($x, $value);}fclose($x);?>
  21. gsmith

    Array problem

    try using a foreach loop to print as well.foreach($t as $value) echo $value;you also need to define $clines array (should be $clines[]) before the foreach loop that iterates through it.
  22. gsmith

    C#

    Thanks, I will check out those links.Any advice/tips though? I understand the basic logic...like using if...else statements, foreach loops, etc. from using other languages. I'm having great difficulty though wrapping my mind around this class, method, constructor stuff. I understand the basic idea of having a class to do one certain task. Implementing that, and knowing how to have the different classes ultimately work together to generate a page is stumping me though.
  23. gsmith

    C#

    W3Schools is great! I feel quite comfortable with PHP, and to a lesser extent, Javascript, XML, and XSLT. All of these I started learning thanks to this site. I'm trying to learn C# now too. I'm having a lot of difficulty, however, due mainly to the OOP aspect of it and all the different classes, methods, etc. Does anyone have any advice or websites that can help me with this? Any chance of getting a C# section on W3Schools?
  24. function e1v16(winner){document.forms[0].east1v16.value=winner}function e8v9(winner){document.forms[0].east8v9.value=winner}<font color="0080FF" onclick="e1v16(this.value)" value="Illinois"><xsl:value-of select="tournament/east/seed1"/></font><font color="FF8040" onclick="e1v16(this.value)" value="Fair Dickinson"><xsl:value-of select="tournament/east/seed16"/></font><font color="0080FF" onclick="e8v9(this.value)" value="Texas"><xsl:value-of select="tournament/east/seed8"/></font><font color="FF8040" onclick="e8v9(this.value)" value="Nevada"><xsl:value-of select="tournament/east/seed9"/></font><input type="text" name="east1v16" size="7%" onclick="e16_1(document.forms[0].east1v16.value)"></input><input type="text" name="east8v9" size="7%" onclick="e16_1(document.forms[0].east8v9.value)"></input> The above is a snippet of what I have. It works in IE and Safari. But in Firefox, it returns "undefined" during the onclick. Can anyone help?
  25. Thank you. I'm pretty new to using ASP.NET though. On the actual webpage, I call the .xml file which uses the .xslt to format and display the data. To do what you're saying, would I reference the .aspx page instead of .xslt inside my XML document, and then have another reference the .xslt from within the .aspx?
×
×
  • Create New...