Re: [PHP] Automatic incoming mail notification

2001-02-02 Thread Nicolas Windpassinger - Sun

Hi guys,

ok I have had the same problem,
what you need to do, If i correctly understood,
is go in the /etc/mail/aliases file,
then write there:


you: "| /path/to/your/script.php"

and your script will begin by:


#!/path/to/php/as/a/shell  

?
etc.

?


How this works is: send an email to [EMAIL PROTECTED]
then this mail will be piped into your script.php

et voila !!

take care,
have fun,
take php,

nicolas.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Easy MySQL question

2001-01-11 Thread Nicolas Windpassinger - Sun



Joseph,
here it is:

Number of manpages in db: 
?php $sql = "SELECT count(*) FROM manpagetool.manpages";
$result= mysql_query($sql); 
$number = mysql_fetch_array($result);
echo $number["count(*)"];
?

hope that's what you were looking for,

Nicolas.


"Paulson, Joseph V. \"Jay\"" wrote:
 
 Hello everyone--
 I've got a easy question that I can't seem to answer for myself.  I'm
 running a query in MySQL and want to know how many entries are in a table
 and then echo that out onto a page.  I thought this would be easy but I
 don't know why it's not working.  Anyway, here's what I am doing:
 
 (open db connection)
 
 $query = "SELECT count(*) FROM Movie";
 $result = mysql_query($sql, $dbLink);
 $myrow = mysql_result($result);
 echo $myrow;
 
 (close db connection)
 
 I know this is wrong but I don't know how to get the results to echo out to
 the page.
 
 Thanks,
 Jay
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]