You are here: Re: [Newbie/PHP 4.4.8] Right way to check POST parameters? « PHP Programming Language « IT news, forums, messages
Re: [Newbie/PHP 4.4.8] Right way to check POST parameters?

Posted by Gilles Ganault on 01/18/08 04:02

On Thu, 17 Jan 2008 20:03:32 -0500, Jerry Stuckle
<jstucklex@attglobal.net> wrote:
>Why on earth would you need the address of their SMTP server?

Because it was easier to suck connect to their SMTP server with the
MSWinsock control and send a few lines of code, than it is to format
data and send them to a remote PHP script with the POST method.

> Even if you had it, you wouldn't be able to send a message through it if it were
>correctly configured.

Why not? I've already done it before.

>But if you want form mail, why not just do it all in VBScript. That's
>what I do in the couple of ASP sites I have.

I don't want to use VBScript.

For those interested, here's some code I found that seems to do the
job:

=================
<?php
foreach ($_POST as $k => $v) {
if(!isset($_POST[$k]) || !strlen($_POST[$k])) {
echo "$k not set!<p>";
exit;
}
}

$fp = fopen ("stuff_received.txt", "w");
fputs ($fp,$_POST['etab']);
fputs ($fp,$_POST['sujet']);
fputs ($fp,$_POST['message']);
fclose($fp);
?>
=================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация