-
PHP mail() is adding spaces
Thanks, that didn't quite work as it removed the submitted data, I managed to fix it with this though: $body = "We have received the following information:\n\n"; foreach($fields as $a => $value) { $body .= $value . ": " . $_REQUEST[$a] . "\n"; } Thanks for the help once more, I'm starting to like php, I might have to put some time in to learning it.
-
PHP mail() is adding spaces
Exactly the same error. EDIT: It had the same error until you edited it, sorry for the confusion.
-
PHP mail() is adding spaces
Unfortunately that gives this error, line 22 is the line with the "$body =..." "Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/vhosts/anlens.freeoda.com/index.php on line 22".
-
PHP mail() is adding spaces
Hi, I am utterly awful in php however I have found this bit of code and modified it to do what I want: <?php $to = "--Removed the e-mail address--"; $from = $_POST["fmail"] ; $name = $_POST["fname"] ; $headers = "From: $from"; $subject = "Contact Form"; $fields = array(); $fields{"fname"} = "Name"; $fields{"fmail"} = "Email"; $fields{"fphone"} = "Phone"; $fields{"ftype"} = "Type of Query"; $fields{"fmessage"} = "Message"; $body = "We have received the following information:\n\n"; foreach($fields as $a => $ { $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } $headers2 = "From: noreply@YourCompany.com"; $subject2 = "Thank you for contacting us"; $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com"; if($from == '') {print "You have not entered an email, please go back and try again";} else { if($name == '') {print "You have not entered a name, please go back and try again";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if($send) {header( "Location: http://google.com" );} else {print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; } } } ?> My only problem is that on the e-mail it sends contains extra spaces before each line (with exception of the first line). Message: We have received the following information: Name: Name Email: e-mail@www.com Phone: Phone Number Type of Query: Catering Message: Message Content Any ideas as to why? Thanks in advance.
-
TUTORIAL: CSS image rollover - horizontal navigation
Doesn't matter any more, I've finally worked out a way to do it, even if inefficiently. :)
-
CSS layering
Perfect, thank you so much :)
-
TUTORIAL: CSS image rollover - horizontal navigation
Hi, thanks for the great tutorial, its taught me a lot about CSS (or rather more or less everything I know about CSS ) however I still can't get one thing to work...drop downs. I know its not intended to be there originally but I've spent several days now trying to add them to it with little success, can anyone give some pointers for adding them? Many thanks once more.
-
CSS layering
My problem is that my website is centred so different screen resolutions cause the absolute position to require a different number, is there a work around for this as relative causes the cell to "grow"?
-
CSS layering
Is it possible to make a div tag "float" in CSS so it will not effect the position of other items, such as not resizing the cell it is placed in and instead overlapping into the next cell? Thanks in advance, Chris
-
Images all have borders in everything except IE
Thanks for the help everyone, I've somehow managed to fix it, no idea how so I can't comment. Any comments on the design on the site would still be appreciated.
-
Drop down menus with CSS
Thanks that is exactly what I need.
-
Drop down menus with CSS
Is it possible to make drop down menu using only CSS and XHTML? If so can anyone recommend any advice or supply any links? Thanks in advance
-
Images all have borders in everything except IE
When I posted this thread all the CSS was within the HTML file, I now have added an external style sheet but it contains identical data. I have changed the images and found that it only does it on the bottom of the image and that when the image is a background the border disappears. Also its available here. (I know the images need optimising, all in good time ) The top image is now set as a cell background which is why the border has vanished - http://www.anlens.co.cc/ EDIT: Any comments on the design would be appreciated, I'm not particularlly good at design.
-
Images all have borders in everything except IE
I'm sure the blue line is a border as I made the images. I've attached a screenshot of the problem and I can put it on line if needed. Changing the border-style tag to use border-style, border or border-width all make no difference. I'm completely stumped by it.
-
Images all have borders in everything except IE
Hi, I've tried searching for this but I can't find it anywhere though I'm probably searching for the wrong thing. In every browser I've tried except IE (chrome, firefox and safari) borders are being added to my images. I've added "border-style: none;" to the CSS with no success in anything except IE. I've even tried adding border="0" to the images (which I really don't want to do as I want this to be vaild strict XHTML). Any ideas as to what I can do to fix this, the entire pages code is below? (It is currently just being made so I can show the idea so the nav bar and several other things are still single images.) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; padding: 0; text-align: center; color: #000000; background-color: #E6E6FF; background-image: url(images/background.png); background-repeat: repeat-x; } .thrColEls #container { width: 46em; margin: 0 auto; border: 0px; text-align: left; } .thrColEls #sidebar1 { float: left; width: 11em; background: #EBEBEB; padding: 15px 0; } .thrColEls #sidebar2 { float: right; width: 11em; background: #EBEBEB; padding: 15px 0; } .thrColEls #sidebar1 h3, .thrColEls #sidebar1 p, .thrColEls #sidebar2 p, .thrColEls #sidebar2 h3 { margin-left: 10px; margin-right: 10px; } .thrColEls #mainContent { margin: 0 12em 0 12em; } .fltrt { float: right; margin-left: 8px; } .fltlft { float: left; margin-right: 8px; } .clearfloat { clear:both; height:0; font-size: 1px; line-height: 0px; } img { border-style: none; } --> </style><!--[if IE]> <style type="text/css"> .thrColEls #sidebar1, .thrColEls #sidebar2 { padding-top: 30px; } .thrColEls #mainContent { zoom: 1; padding-top: 15px; } </style> <![endif]--></head> <body class="thrColEls"> <div id="container"> <table width="736" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td><img src="images/header.png" alt="" width="736" height="172" border="0" /></td> </tr> <tr> <td><img src="images/nav_temp.png" alt="" width="736" height="32" border="0" /></td> </tr> <tr> <td style="background-image: url(images/bottom_temp.png); height:600px"> </td> </tr> </table> <!-- end #container --></div> </body> </html>