Jump to content

martinstan

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

martinstan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey I've just seen your donation thread too. Consider it done. Good forum and deserves some support.
  2. I see. Yes it works! Not much of a programmer am I Thanks to all. Martin
  3. Well gave it a go and got the following error; Parse error: syntax error, unexpected '@' in /home/sites/domain.co.uk/public_html/process.php on line 25 line 25 being $headers = "From: ".someone@fixed-email-address.co.uk. "\n"; Just to clear things up I'm using valid email addresses in my actual coding. I'm just putting dummy ones in here for the purposes of the posting. $to = "webenquiry@adomain.co.uk"; $name = $_POST['name']; $company = $_POST['company']; $tel = $_POST['tel']; $email = $_POST['email']; $msg = $_POST['msg']; $d = date('l dS \of F Y h:i:s A'); $sub = "Contact from website"; $headers = "From: ".someone@fixed-email-address.co.uk. "\n"; $mes .= "Name: ".$name."\n"; $mes .= "Company: ".$company."\n"; $mes .= "Tel No: ".$tel."\n"; $mes .= 'Email: '.$email."\n"; $mes .= "Message: ".$msg."\n"; Is this an expected error with this and is my coding just wrong? Thanks Martin BTW I've checked with my ISP and they say they don't have a problem with me doing this.
  4. Hi Guys Wow I really appreciate how quickly you've got back to me on this. I know it sounds odd and I'm not fully clear about it myself so apologies for the slightly vague interpretation. It's some 'Hardware' bloke who's asked me to do this. I think the idea is that the senders email address will still be collected by the form as part of the email body, but the 'from' field in the header will remain generic so that the spam filters will always recognise it as being safe. Would this work in principle: $headers = "From: "someone@fixed-email-address.co.uk "\n"; I can worry about the ISP issues later. Many thanks Martin
  5. Hi I've been asked to do something on a simple contact form but I'm not sure how to do it. Hopefully someone can help. How can I set a form to always be from a particular email address. Here's the code I'm using: $to = "webenquiry@adomain.co.uk"; $name = $_POST['name']; $company = $_POST['company']; $tel = $_POST['tel']; $email = $_POST['email']; $msg = $_POST['msg']; $d = date('l dS \of F Y h:i:s A'); $sub = "Contact from website"; $headers = "From:" .$email."\n"; $mes .= "Name: ".$name."\n"; $mes .= "Company: ".$company."\n"; $mes .= "Tel No: ".$tel."\n"; $mes .= 'Email: '.$email."\n"; $mes .= "Message: ".$msg."\n"; I'm assuming it's something I need to change in the $headers = "From:" .$email."\n"; Can I just replace the variable $email to a fixed email address? The reason I've been asked to do this is because many of the email addresses that people use on the contact form are being filtered out by over zealous spam filters. Having the form saying it's from someone@fixed-email-address.co.uk would get them around this problem. Many Thanks Martin
  6. Hi Thanks for your help. Looks very interesting...but not quite sure what it does yet. I'll work through the demo Martin
  7. Hi I'm looking for a very simple way of monitoring the number of clicks through from just a single small banner on my website to another website. Does anyone know of any open source coding to help me achieve this or something I can pay a small amount for. Many thanks Martin
  8. Hi Thanks guys. Gets me going in the right direction.
  9. Hi All I'm a designer wanting to learn some PHP. I've gained a basic grasp of PHP and can I suppose 'hack' code that has already been written but can't write any code that would be much use at the minute. I'm looking for a tutorial that would allow me to create a form that could be used to collect basic user info. (Name, address, Tel etc..), store this in a Mysql db and then allow me to search by field. A 'bog standard' process using something like Access but I'd like this to be able to be used online. I'd appreciate either a tutorial as to where to start or even better some ready made code that I could hack around with. Thanks in advance
  10. Hi Cep Sorry, I cut and pasted what you put and then realised you'd put '$message' instead of '$mes'.
  11. Hi Cep Thanks for your help but now I'm getting an email with an empty body, no subject, however it does say who it is from. Do I need to create the '$mail' variable anywhere? Martin
  12. Hi Sorry for a painfully basic question but I'm having problems with this form. It kind of works but instead of the information collected in the fields being in the body of the email, it's appearing as the mail subject??? Please help! Thanks Martin [code]<?php $to      = "info@myemailaddress.co.uk"; $name    = $_POST['name']; $tel   = $_POST['tel']; $email    = $_POST['email']; $msg      = $_POST['msg']; $d        = date('l dS \of F Y h:i:s A'); $sub      = "Contact from website"; $headers  = "From:" .$name .$email."\n";  $mes    .= "Message: ".$msg."\n"; $mes    .= "Name: ".$name."\n"; $mes .= "Tel: ".$tel."\n"; $mes    .= 'Email: '.$email."\n"; $mes    .= 'Date & Time: '.$d; if (empty($name) || empty($tel) || empty($email) || empty($msg)) {     echo "  <h3>Sorry all fields are required.</h3>"; } elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {     print "  <h3>Sorry the email address you entered looks like it's invalid.</h3>"; } else {     mail($to, $mes, $headers);     print "  <h3><center>Thank you ".$name." for contacting us.<br>We will get back to you as soon as possible</center></h3>"; } ?>[/code] the form [code] <form method="post" action="send.php">     Name:<br><input name="name" type="text" size="40">     <br><br>     Tel:<br><input name="tel" type="text" size="40">     <br><br> Email:<br><input name="email" type="text" size="40">     <br><br>     Message:<br><textarea name="msg" cols="40" rows="6"></textarea>     <br><br>     <input type="reset" value="Reset">&nbsp;<input type="submit" value="Send">   </form>[/code]
  13. Hi sorry to bump this but I thought the subject may have been misleading. Martin
  14. Hi I got a free one from here: http://www.ratite.com/whois/link_to_global_whois.html Martin
×
×
  • 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.