Jump to content

Tam_Zeb

Members
  • Posts

    10
  • Joined

  • Last visited

Tam_Zeb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi CroNix Are you suggesting I modify the contact.php page with this code and if so where exactly does this new code go and is there any code I need to delete ?
  2. I seem to recall my old server having a .htaccess file but this new windows server doesn't have one of those either. I seem to be getting out of my depth with this.. I am just so tired... Sorry for rambling
  3. Hi Guru Sorry but this is all double dutch to me now. There was I time when I knew all this stuff back in 2002 but I haven't done any coding since about 2008. How quickly ones memory fades. I had thought my Host Provider would have some guidance notes a but alas it's not as user friendly as the old websites used to be where the Host Providers were enthusiastic pioneers keen to help Webmaster build and maintain websites on dialup systems. Now it's just a business and making money..
  4. Thanks Guru I guess I should have said I am running on a Windows Server if that should make a difference.
  5. Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in E:\kunden\homepages\24\d540637311\www\mailtest.php on line 2 Mail sent! Sorry if that came over rather rudely I am still feeling pretty rough. Ok I ran the mailtest.php and here is the error
  6. There is NO php.ini file on my server.. I want to create a php.ini to upload.. All I want is some simple code which will recognize my contact.php
  7. Managed to grab a few hours sleep. Ok above is the code I am using for my contact.php I pulled it from a tutorial on the web and stripped out the stuff that wasn't relevant to my needs.
  8. <?php /* Set e-mail recipient */ $myemail = "MY GOES EMAIL HERE"; /* Check all form inputs using check_input function */ $yourname = check_input($_POST['yourname'], "Enter your name"); $subject = check_input($_POST['subject'], "Write a subject"); $email = check_input($_POST['email']); $comments = check_input($_POST['comments'], "Write your comments"); /* If e-mail is not valid show error message */ if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email)) { show_error("E-mail address not valid"); } /* Let's prepare the message for the e-mail */ $message = "Hello! Your contact form has been submitted by: Name: $yourname E-mail: $email Comments: $comments End of message "; /* Send the message using mail() function */ mail($myemail, $subject, $message); /* Redirect visitor to the thank you page */ header('Location: thanks.html'); exit(); /* Functions we used */ function check_input($data, $problem='') { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); if ($problem && strlen($data) == 0) { show_error($problem); } return $data; } function show_error($myError) { ?> <html> <body> <b>Please correct the following error:</b><br /> <?php echo $myError; ?> </body> </html> <?php exit(); } ?>
  9. Hi Guy's Thanks for your prompt responses.. How do I know it's the php.ini - I don't have a php.ini on my server side I did a quick test to see what message I got and the message I got back made reference to the php.ini. When I checked the Server no php.ini This is the sample code I am using for the contact.php I have removed the email address at the top of the page Opps for some reason the site won't let me paste anything
  10. Hey Guy's I need a quick fix to solve an urgent problem.. I used to do some coding years ago but the old grey matter is not so responsive these days and I have been up all night trying to resolve a problem. I have built a website for my daughters and created a simple web form but I have come unstuck. All those skills I once took for granted are gone. So here's where I am at. I've created an input form_mail.html, a contact.php and a reply.html page uploaded them to the Server and hit an error when I tried to send a message. The problem it seems is with the PHP.ini File. In short I don't have one Duh! Yes I know I should go back and study and that much I intend to do I am currently installing xxampp, MySQL and php on my new laptop. But in the meantime I need your help urgently.. What code do I need in the php.ini file to make the Form Mail work? Is there somewhere on the web where I can see a simple code, I am just too tired to wade through heavy docs right now. Your help would be much appreciated at this time. Sincerely Tam
  11. Hi Guy's An old timer here, used to code years ago but the grey matter is not so responsive. Will be posting a query over on the help pages. I would appreciate your help and your patents. Tam
×
×
  • 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.