-
Posts
507 -
Joined
-
Last visited
Everything posted by phpfreak
-
Good luck in whichever route you choose!
-
grumbles at IE
-
You may just need to make $from an actual e-mail address and your headers should be fine the way your example was.
-
I see that you're not actually using the $headers variable in your mail function. so, $from = "Katralin.nl" isn't actually going to do anything in the headers... Check the http://php.net/mail function and the example it gives you to use the $headers is as follows: <?php $to = '[email protected]'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); ?>
-
Sounds like a DNS issue.. Perhaps your web server is trying to do a lookup on your IP address and since it's internal, it can't find anything and causing the 10 - 20 second delay. I would check that you have your internal DNS setup and pointing to the correct places, or edit your hosts file and see if you can map hostnames to your local IP, or disable hostname lookups in either your Apache config or PHP config if necessary.
-
Can you show us the code?
-
Perhaps check into empty() foreach ( $requiredFields as $requiredField ) { if ( empty( $_POST[$requiredField] )) { $missingFields[] = $requiredField; } } However, if the strict error reporting is on, you may still get an undefined variable message - those you need to suppress or hide on a production environment.
-
Code "Back" button to retain values from $_POST
phpfreak replied to karthikjayraj's topic in PHP Coding Help
The best way to do this would be to code your Back Button to the form post page and make it another form... post those fields as <input type="hidden" name="fieldname" value="posted_value" /> then post the submitted values back to the form and populate the fields based on the original information submitted. IE sucks - and this is one reason why - many of us PHP developers wish IE was never created... -
You may want to look into the phpMailer class. It has SMTP support and is fairly easy to use.
-
Not really sure what you're asking here... can you give us some more information on the 'rating bar' ? What is it, and how is it displayed? Where do these stars come from? Are they images? Are they produced by Javascript or CSS?
-
Thanks for the comment tonyhh!
-
Newbie Trying to get my head around Web Forms!
phpfreak replied to racercam's topic in PHP Coding Help
That wouldn't do much if anything at all. The Mail function handles a few arguments: mail ($to, $subject, $message) Please read up on the function in more detail: http://www.php.net/manual/en/function.mail.php -
Have you tried to send your browser source output to the W3C Validator? http://validator.w3.org/ There's also a CSS validator on there as well.. would be worth checking out.
-
Need help with sending to multiple email addresses
phpfreak replied to jools619's topic in PHP Coding Help
You can send to multiple addresses via the mail function just comma separate the addresses in the TO argument - but the issue is unless you setup a BCC header - all the e-mail recipients would see each other. I'm not sure if you would want to do that or not... perhaps just do a loop and send one e-mail through the function per e-mail address. -
Are you still echoing it twice? Show us your latest code.
-
Personally I gave up on double quotes a long time ago. There technically shouldn't be any problem other than you have to constantly escape double quotes in your HTML and that drives me crazy. There's many theories behind developing theme layers versus data layers and some people wouldn't even use HTML in your PHP code - they would use a straight up theme system for that that takes variables / strings and puts them into the template properly, so in your template you may have placeholders like {SOME_VARIABLE} that would be replaced. That's a bit of a pain in the ass to me and I don't mind putting HTML within my PHP. For example, instead of doing: <? $foo = 'Hi, I\'m FOOO!'; echo 'Who is foo? '.$foo.'; ?> Would be how I would do it.. or <? $foo = 'Hi I am Foo'; ?> Who is foo? <?=$foo?> Would be another way.. I'm not sure if this directly answers your question, but I prefer single quotes...
-
Hmm, that is an interesting one... sounds like the bug in the program should be fixed before you go crazy trying to find a work around.
-
Welcome to the site and congrats on your PHP site!
-
Welcome to the addiction! Glad to have you!
-
Welcome to the addiction! Glad to have you!
-
Howdy! Welcome to PHP Freaks! Looking forward to seeing you around!
-
Welcome to the site and Community! It's good to have you here!
-
Hi Paul, It's nice to meet you. Post away - just check the rules and be sure to be as descriptive as possible!
-
I agree - but suppressing them is less "overhead" than outputting them.. The best way to get rid of all the error reporting would be <? ini_set('display_errors', 0); error_reporting(0); ?> Or do it on the server level via .htaccess or the httpd.conf
-
Session Data is Not Being Carried to 3rd Page
phpfreak replied to OldWest's topic in PHP Coding Help
Some things confuse me here, and concern me... <input type="hidden" name="PHPSESSID" value="<?php echo $PHPSESSID ?>" /> Why do you post the SESSION ID in a form? This should be saved on the server / user's cookie. If you put this in a form, you could potentially allow someone to override it.. but that would have to be some intelligent work - but possible. Possibly a security risk? <?php if ($_SESSION[''] = 1) { session_destroy(); echo "Toast!"; } else { echo "Not Toast!"; }; ?> You're defining $_SESSION[''] (nothing) as 1 here - not testing it. Use the '==' operator instead. However, this may be more practical: <?php if (session_id() > 0) { session_destroy(); echo "Toast!"; } else { echo "Not Toast!"; }; ?> I'd check up on these functions here and see how they are used in more detail: http://www.php.net/manual/en/function.session-id.php