Jump to content

quartney

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

quartney's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks. I posted the solution in my second post, which was that the "from" field had to be from my domain name, not from gmail.
  2. Looks like the "from" field in the php file has to be from my domain's email (not gmail) for the email to go through!
  3. I'm super-frustrated because I can't get my contact us email form to work on the freehostia.com servers (and I have a paid plan). I have made three different versions and none of them work. HOWEVER, I've uploaded each of them to a website hosted by a different company and they all work there. Freehostia support put a mail.php file on my account to prove that the mail function works. And the thing is, that mail.php page does send me mail! So, at it's basic, here is the code I'm using to send me email from our contact us page. I am redirected to the contactthanks.html (success) page--I just am not receiving any email at my account afterwards. Does this code look okay? Do you have any suggestions as to what I'm doing wrong? Thanks! <?php $EmailFrom = "courtneyburge@gmail.edu"; $EmailTo = "courtneyburge@gmail.com"; $Subject = "KLEAN E-update signup"; $Name = Trim(stripslashes($_POST['Name'])); $Email = Trim(stripslashes($_POST['Email'])); // validation $validationOK=true; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; exit; } // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=contactthanks.html\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?>
  4. Thanks, that's exactly what I needed to know!!!
  5. Hi Simon: I see that you suggested that I try br. The thing is, I don't care if the lines are separate or not, because this is a silly exercise. I just would like to know why \n isn't working for me. thanks, Q.
  6. Hi, I am trying to learn php from a book and am doing the sample exercises. I can't figure out why \n isn't making a new line for me. I am using php 5.2.0. Here is the code, and it is being output on one line. <?php $name = "Paul"; print "Your name is $name\n"; $name2 = $name; $age = 20; print "Your name is $name2, and your age is $age\n"; print "Goodbye, $name!\n"; ?> thanks a lot for your help! Q.
  7. Craygo & Anner: thank you both so much!  Your suggestions worked perfectly  ;D
  8. This is an easy php question but I'm having major difficulties figuring out the answer. I have a drop-down menu on the index page, where you can choose a country from a list.  The results page should be names of people who live in that country. MySQL:  My table "country" has two columns: countryName and countryID; My table "personal" has many columns, like name and address, as well as countryID When a country name is chosen, I need to change that countryName into countryID.  Then, I'll use the countryID to get the names of people who have that same countryID in the personal table. ***My question is, where and when do I change the countryName into countryID?*** I've got the index page sending a POST variable with the countryName, and the results page will list names of people who have the corresponding countryID, but I'm missing the crucial step of transforming the countryName into countryID. Many thanks for any help you can provide, Q.
  9. [quote]That's the thing....they don't want you connecting to the database remotely regardless of what you use. As long as you connect from within the server, you'll be fine.[/quote] Yeah, that's exactly what I don't know how to do. [quote]If the default server/host is "localhost" then make sure your connection string reflects that.[/quote] Well, you've given me something to google, at least.  Thanks.
  10. Thank you, I know how to code HTML in notepad.  It's the php stuff that I need Dreamweaver for.  I understand what they were telling me; what I need to know is how to make a connection without using dreamweaver then.
  11. Hi--I did read the posting guidelines and I can't even find the Newbie Help board  ???  I think my brain is fried from messing around with php and mysql. Here is my problem.  I learned how to set up a database and make queries through Dreamweaver using the procedures in a book.  Now, the place that is hosting the remote files told me "Please don't use Dreamweaver for any mysql connection. You are only authorized from "localhost". Access your database stuff from the phpMyAdmin page, please." [it's phpMyAdmin 2.6.1-pl3] So, how in the world do I make a database connection through phpMyAdmin?  I'm sorry for this really stupid question.  I don't pretend to understand what I'm doing and I hope some kind soul takes pity on me  :) I do have Apache and MySQL running locally (XAMPP) and everything works fine when I preview the pages.  The problems start when I upload my files remotely. thanks a bunch, Courtney
×
×
  • 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.