php-general Digest 24 Mar 2003 13:56:35 -0000 Issue 1957
Topics (messages 140790 through 140847):
Re: Calculating the difference between two dates
140790 by: Don Read
140791 by: Greg Beaver
140817 by: Nenad Djordjevic
Re: reloading a page..
140792 by: Leo Spalteholz
140797 by: Beauford.2002
140803 by: Leo Spalteholz
Generated input names
140793 by: Richard Whitney
140794 by: Richard Whitney
140801 by: Jason Wong
140804 by: Richard Whitney
require_once for php3
140795 by: daniel
140796 by: Jason Sheets
140813 by: Don Read
php based spreadsheet-like app?
140798 by: Bradley C. Goldsmith
what should I do?
140799 by: Doug Parker
Re: [PHP-DEV] [systems] cvs server moving
140800 by: James Cox
odd problem
140802 by: Sebastian
140806 by: Jack
140808 by: rush
Re: [PHP-DB] mysql timestamps
140805 by: L0vCh1Y
140816 by: Don Read
140846 by: John W. Holmes
Help-- 255 characters limitation in <textarea>.
140807 by: Larry_Li.amat.com
PHP Send Mail Main headers.
140809 by: Philip J. Newman
140820 by: Don Read
140825 by: Jason Wong
array
140810 by: Wilbert Enserink
cookbook/recipes sites?
140811 by: Jeff D. Hamann
help on sessions
140812 by: Philippe Lemmerling
File manipulation tutorials / helpful resources
140814 by: Tony Crockford
140833 by: liljim
overriding upload_tmp_dir
140815 by: Roger Thomas
140823 by: Jason Wong
Interesting Error??
140818 by: Fatih Üstündağ
Odd Parse Error
140819 by: shaun
140821 by: liljim
140822 by: Ernest E Vogelsinger
Help me pervade Bristol City council to use PHP
140824 by: Ben Edwards
140826 by: rush
140827 by: M.A.Bond
When to use htmlentities()
140828 by: rotsky
140831 by: liljim
How to count & check # of user connected
140829 by: P Lok
140835 by: Marek Kilimajer
140845 by: P Lok
Setprecision ?? pls help
140830 by: Adriaan Nel
140834 by: Marek Kilimajer
140836 by: Joshua Moore-Oliva
Why NOT you ?
140832 by: Khim
The tool that generates documentation for PHP's website
140837 by: James
Viewing PHP pages
140838 by: Andy
140839 by: Ben Edwards
140840 by: Andy
140842 by: Christian Rosentreter
mail() function
140841 by: John Love
hide multiple recipients
140843 by: mailing
Retrieve values from checkboxes
140844 by: shaun
prepare() and execute()
140847 by: Charles Kline
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
On 24-Mar-1998 Beauford.2002 wrote:
> Does any one know how to calculate the difference between two dates. I
> need
> to find out the age of a user to make sure they are over the age of 13. I
> have searched for hours on this and found nothing that will help.
>
Start here:
echo date('Y-m-d', strtotime('13 years ago'));
Sorry, it doesn't check the birth certificate ;)
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--- End Message ---
--- Begin Message ---
Hi,
Ask them who the president of the United States was before Britney
Spears, that should work pretty well :)
Otherwise, check out the Date package in PEAR at
http://pear.php.net/package-info.php?pacid=57
Greg
--
phpDocumentor
http://www.phpdoc.org
Don Read wrote:
On 24-Mar-1998 Beauford.2002 wrote:
Does any one know how to calculate the difference between two dates. I
need
to find out the age of a user to make sure they are over the age of 13. I
have searched for hours on this and found nothing that will help.
Start here:
echo date('Y-m-d', strtotime('13 years ago'));
Sorry, it doesn't check the birth certificate ;)
Regards,
--- End Message ---
--- Begin Message ---
Hello,
First you need to convert dates in timestamp:
int mktime ( int hour, int minute, int second, int month, int day, int year [, int
is_dst])
or
strtotime('YYYY-MM-DD');
(year-month-date; 4 digit year; month and date need to be with leading zero)
Then you can use function like DateDiff('yyyy', $date1, $date2);
/***
* Interval:
- yyyy Year
- q Quarter
- m Month
- y Day of year
- d Day
- w Weekday
- ww Week of year
- h Hour
- n Minute
- s Second
*/
function DateDiff($interval, $date1, $date2)
{
// get the number of seconds between the two dates
$timeDifference = $date2 - $date1;
$res = 0;
switch ($interval) {
case 'yyyy':
$diff = 0;
break;
case 'q':
$diff = 0;
break;
case 'm':
$diff = 0;
break;
case 'y':
$diff = 0;
break;
case 'd':
$diff = bcdiv($timeDifference, 86400, 0);
break;
case 'w':
$diff = bcdiv($timeDifference, 604800, 0);
break;
case 'ww':
$diff = 0;
break;
case 'h':
$diff = bcdiv($timeDifference, 3600, 0);
break;
case 'n':
$diff = bcdiv($timeDifference, 60, 0);
break;
case 's':
$diff = $timeDifference;
break;
default:
$diff = 0;
}
$res = $diff;
return $res;
}
________________________
Best regards,
Nenad Djordjevic mailto:[EMAIL PROTECTED]
Diyomi Soft
http://www.diyomisoft.com/
Tuesday, March 24, 1998, 2:44:12 AM, you wrote:
B2> Does any one know how to calculate the difference between two dates. I need
B2> to find out the age of a user to make sure they are over the age of 13. I
B2> have searched for hours on this and found nothing that will help.
B2> TIA
--- End Message ---
--- Begin Message ---
On March 23, 2003 02:34 pm, Beauford.2002 wrote:
> The link in question is there by design and should be there, but
> below is what I am talking about.
>
> > Even better, if a user cannot be validated then you can redirect
> > them back
>
> to where they
>
> > came from (referrer). That would effectively achive your goal by
> > refreshing the original page no matter where they;re coming from.
>
> This is what I have, but no matter what I do I can not get a
> message to appear on the referring page saying you have no access
> to the other page, and I have also read that 'HTTP_REFERER' is not
> very reliable....
No you shouldn't rely on it to do anything important but in your case
its just where the user will be redirected to. Even if someone fakes
the referrer to point to the restricted page it will just go into an
infinite loop.
> if($userlevel != $neededlevel) {
> include ($_SERVER['HTTP_REFERER']);
> $message = $no_permission;
> $exit;
> }
>
> ...on referring page....
>
> <? if ($message) { echo $message; } ?>
Code seems fine. You probably are never entering into that if
statement or the referrer is outputting something unexpected.
Use some print statements to debug this..
print("{$userlevel} and {$neededlevel}");
print($_SERVER['HTTP_REFERER']);
Of course make sure $no_permission actually contains a string...
Leo
--- End Message ---
--- Begin Message ---
It's definitely going through the if statement as it does "reload" the
page - print($_SERVER['HTTP_REFERER']); shows
http://www.myserver.com/oldpage.html - which is correct. print("{$userlevel}
and {$neededlevel}"); also shows the correct info. $no_permission does
have a string, but even if I hard code the message it still doesn't work.
Note though....if I take out include ($_SERVER['HTTP_REFERER']); from the
if statement and put in print($_SERVER['HTTP_REFERER']); and print
$message - they both display.
So I am at a loss....
> No you shouldn't rely on it to do anything important but in your case
> its just where the user will be redirected to. Even if someone fakes
> the referrer to point to the restricted page it will just go into an
> infinite loop.
>
> > if($userlevel != $neededlevel) {
> > include ($_SERVER['HTTP_REFERER']);
> > $message = $no_permission;
> > $exit;
> > }
> >
> > ...on referring page....
> >
> > <? if ($message) { echo $message; } ?>
>
> Code seems fine. You probably are never entering into that if
> statement or the referrer is outputting something unexpected.
> Use some print statements to debug this..
>
> print("{$userlevel} and {$neededlevel}");
> print($_SERVER['HTTP_REFERER']);
>
> Of course make sure $no_permission actually contains a string...
>
> Leo
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On March 23, 1998 08:53 pm, Beauford.2002 wrote:
> It's definitely going through the if statement as it does "reload"
> the page - print($_SERVER['HTTP_REFERER']); shows
> http://www.myserver.com/oldpage.html - which is correct.
> print("{$userlevel} and {$neededlevel}"); also shows the correct
> info. $no_permission does have a string, but even if I hard code
> the message it still doesn't work.
>
> Note though....if I take out include ($_SERVER['HTTP_REFERER']);
> from the if statement and put in print($_SERVER['HTTP_REFERER']);
> and print $message - they both display.
>
> So I am at a loss....
OH!!!! I think I've got it. the problem is that you're including the
page before you set the message. So of course in the include the
$message will still be an empty string and therefor not display it.
so rearange the two lines like this:
$message = $no_permission;
include ($_SERVER['HTTP_REFERER']);
and it should work.
HTH,
Leo
--- End Message ---
--- Begin Message ---
Greetings!
I have several (up to 100) input boxes being generated on the fly.
I need to somehow grab the names generated for each one to then insert the
values into a database (MySQL), one per row.
I've looked at variable variables on php.net, but I thought I would pick your
brains, just in case any of you have had the same situation.
All suggestions are greatly appreciated!
--
Richard Whitney *
Transcend Development
Producing the next phase of your internet presence.
[EMAIL PROTECTED] *
http://xend.net *
602-971-2791
* * *
* * *__ * *
_/ \___ *
* / * \* *
*/ * * \
* */\_ |\
/ \_ / \
/ \____/ \
/ \
/ \
/ \
--- End Message ---
--- Begin Message ---
By the way, some names are various colorsappended with a size letter (i.e.
BlackM, GreenXL, etc.)
others are simply a letter incremented starting with a.
Thanks
Quoting Richard Whitney <[EMAIL PROTECTED]>:
### Greetings!
###
### I have several (up to 100) input boxes being generated on the fly.
### I need to somehow grab the names generated for each one to then insert
### the
### values into a database (MySQL), one per row.
###
### I've looked at variable variables on php.net, but I thought I would pick
### your
### brains, just in case any of you have had the same situation.
###
### All suggestions are greatly appreciated!
###
### --
### Richard Whitney *
### Transcend Development
### Producing the next phase of your internet presence.
### [EMAIL PROTECTED] *
### http://xend.net *
### 602-971-2791
### * * *
### * * *__ * *
### _/ \___ *
### * / * \* *
### */ * * \
### * */\_ |\
### / \_ / \
### / \____/ \
### / \
### / \
### / \
###
###
### --
### PHP General Mailing List (http://www.php.net/)
### To unsubscribe, visit: http://www.php.net/unsub.php
###
###
--
Richard Whitney *
Transcend Development
Producing the next phase of your internet presence.
[EMAIL PROTECTED] *
http://xend.net *
602-971-2791
* * *
* * *__ * *
_/ \___ *
* / * \* *
*/ * * \
* */\_ |\
/ \_ / \
/ \____/ \
/ \
/ \
/ \
--- End Message ---
--- Begin Message ---
On Monday 24 March 2003 12:04, Richard Whitney wrote:
> By the way, some names are various colorsappended with a size letter (i.e.
> BlackM, GreenXL, etc.)
>
> others are simply a letter incremented starting with a.
If I was doing this I would put all form elements into an array and thus name
them like:
"form[BlackM]"
"form[GreenXL]"
etc
Then I can just for-loop through $_POST['form'] (or $_GET['form']) to get
everything single form element.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"I'm a mean green mother from outer space"
-- Audrey II, The Little Shop of Horrors
*/
--- End Message ---
--- Begin Message ---
Thanks for your suggestions everyone - I have the problem under control!
Richard
Quoting Jason Wong <[EMAIL PROTECTED]>:
### On Monday 24 March 2003 12:04, Richard Whitney wrote:
### > By the way, some names are various colorsappended with a size letter
### (i.e.
### > BlackM, GreenXL, etc.)
### >
### > others are simply a letter incremented starting with a.
###
### If I was doing this I would put all form elements into an array and thus
### name
### them like:
###
### "form[BlackM]"
### "form[GreenXL]"
### etc
###
### Then I can just for-loop through $_POST['form'] (or $_GET['form']) to get
###
### everything single form element.
###
### --
### Jason Wong -> Gremlins Associates -> www.gremlins.biz
### Open Source Software Systems Integrators
### * Web Design & Hosting * Internet & Intranet Applications Development *
### ------------------------------------------
### Search the list archives before you post
### http://marc.theaimsgroup.com/?l=php-general
### ------------------------------------------
### /*
### "I'm a mean green mother from outer space"
### -- Audrey II, The Little Shop of Horrors
### */
###
###
### --
### PHP General Mailing List (http://www.php.net/)
### To unsubscribe, visit: http://www.php.net/unsub.php
###
###
--
Richard Whitney *
Transcend Development
Producing the next phase of your internet presence.
[EMAIL PROTECTED] *
http://xend.net *
602-971-2791
* * *
* * *__ * *
_/ \___ *
* / * \* *
*/ * * \
* */\_ |\
/ \_ / \
/ \____/ \
/ \
/ \
/ \
--- End Message ---
--- Begin Message ---
hi there is a way to include files once in php3 ?
--- End Message ---
--- Begin Message ---
You could write a wrapper around the include function that uses a global
array, each time it is called it checks the global array to see if the
file has been included, if it hasn't it includes the file and adds the
file to the array.
Jason
daniel wrote:
hi there is a way to include files once in php3 ?
--- End Message ---
--- Begin Message ---
On 24-Mar-2003 daniel wrote:
> hi there is a way to include files once in php3 ?
>
I've always used function_exists():
if (! function_exists('debug'))
include('common.inc'); // get the basics
if (! function_exists('array_pop'))
include('libphp4.php3'); // get emulation lib.
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--- End Message ---
--- Begin Message ---
Hi,
Does anyone know of a php (or other really) based web app that provides
spreadsheet like tables with formulae support?
Cheers,
Brad
--
Bradley C. Goldsmith <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
My server has cURL built into its php module, but it doesn't support
SSL, and thus doesn't support requests to secure servers, i.e. https.
It was an effort in itself to get them incorporate cURL, and I was just
wondering if I should move immediately to a new host - if this were just
ridiculous. I needed cURL badly in order to process credit card
transactions, now I don't even have the option. I supposed I could use
the PHP wrapper with the API, but it looks difficult and the processing
company (Linkpoint) really doesn't seem to have their stuff together as
far as support goes, or anything for that matter. What should I do? If
I should move, could anyone suggest a decent host that could handle the
aforementioned?
any help would be greatly appreciated...
--- End Message ---
--- Begin Message ---
All,
I think everything is now moved; cvs checkouts should still be fine, and as
dns changes over, commits will become possible again. (if you need to make a
commit now, please tell your system that cvs.php.net happens to point at
pb11.pair.com)
When dns converges, work will continue on lxr and bonsai to return them to
service.
Thanks,
James Cox
>
> Just a heads up,
>
> we should be moving the cvs apparatus from one server to another
> in the next
> few hours. The only down time will be whilst your dns updates,
> and this will
> _only_ affect cvs COMMITS -- not checkouts.
>
> Thanks for your patience.
>
> James Cox
> php sysadmin
>
> --
> James Cox :: [EMAIL PROTECTED] :: http://imajes.info/
> Was I helpful?
> http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
hello all,
having a little problem. I know i have a connection to the mysql database
but for some reason i can't get this to update the database when submit is
clicked. perhaps i am overlooking something.. Here is part of the script:
if($HTTP_POST_VARS[send]) {
$result = $db->sql("UPDATE comments SET reported = '1' WHERE id =
'$HTTP_GET_VARS[comment]'");
}
// some echos..
echo "
<form action=\"report.php\" method=\"post\">
<input type=\"hidden\" name=\"send\" value=\"done\">
<input type=\"submit\" value=\"send\">
</form>";
Its suppose to update mysql once the submit button is pressed, but its not..
Is the form ok?
cheers,
- Sebastian
--- End Message ---
--- Begin Message ---
"Sebastian" <[EMAIL PROTECTED]> wrote:
> having a little problem. I know i have a connection to the mysql database
> but for some reason i can't get this to update the database when submit is
> clicked. perhaps i am overlooking something.. Here is part of the script:
>
> if($HTTP_POST_VARS[send]) {
>
> $result = $db->sql("UPDATE comments SET reported = '1' WHERE id =
> '$HTTP_GET_VARS[comment]'");
>
> }
from where do you get this: $HTTP_GET_VARS[comment] ?? ( GET <--> POST, 'comment'? )
> echo "
> <form action=\"report.php\" method=\"post\">
> <input type=\"hidden\" name=\"send\" value=\"done\">
> <input type=\"submit\" value=\"send\">
> </form>";
>
> Its suppose to update mysql once the submit button is pressed, but its not..
> Is the form ok?
looks ok
--- End Message ---
--- Begin Message ---
"Sebastian" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> having a little problem. I know i have a connection to the mysql database
> but for some reason i can't get this to update the database when submit is
> clicked. perhaps i am overlooking something.. Here is part of the script:
one of the ways to debug such problems is that you echo sql statement you
are sending to mysql. In 99% of the cases you will spot some syntax error in
it missing a quote, or some value not filled in properly. Once you find out
what is wrong with sql statement, you can go on, and find out what caused
it.
rush
--
http://www.templatetamer.com/
--- End Message ---
--- Begin Message ---
JWH> SELECT TO_UNIXTIME(your_column) FROM table ...
It doesn't work... MySQL returns error - what could be trouble in? I
also tried
SELECT TO_UNIXTIME(foo) AS bar FROM baz
But it's look like it doesn't know such function :\.
I tried table in next types: TIMESTAMP,DATETIME.
--
Best regards,
L0vCh1Y
--- End Message ---
--- Begin Message ---
On 24-Mar-2003 L0vCh1Y wrote:
>
>
> JWH> SELECT TO_UNIXTIME(your_column) FROM table ...
>
>
> It doesn't work... MySQL returns error - what could be trouble in? I
> also tried
>
> SELECT TO_UNIXTIME(foo) AS bar FROM baz
>
> But it's look like it doesn't know such function :\.
>
> I tried table in next types: TIMESTAMP,DATETIME.
>
>
There's no such function in MySQL but there is UNIX_TIMESTAMP():
localhost.dread$ grep TO_UNIXTIME $MANUAL
localhost.dread$ grep UNIX_TIMESTAMP $MANUAL
`RAND()'. You can, for example, use `UNIX_TIMESTAMP()' for the
`UNIX_TIMESTAMP()'. Other functions operate on the formatted
`UNIX_TIMESTAMP()'
`UNIX_TIMESTAMP(date)'
`UNIX_TIMESTAMP()' is called with a `date' argument, it returns
<snip>
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--- End Message ---
--- Begin Message ---
Yeah, sorry, it's the UNIX_TIMESTAMP() function you want.
FROM_UNIXTIME() will convert a Unix timestamp to a MySQL timestamp,
also.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
> -----Original Message-----
> From: Don Read [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2003 4:30 AM
> To: L0vCh1Y
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Re[2]: [PHP-DB] mysql timestamps
>
>
> On 24-Mar-2003 L0vCh1Y wrote:
> >
> >
> > JWH> SELECT TO_UNIXTIME(your_column) FROM table ...
> >
> >
> > It doesn't work... MySQL returns error - what could be trouble in? I
> > also tried
> >
> > SELECT TO_UNIXTIME(foo) AS bar FROM baz
> >
> > But it's look like it doesn't know such function :\.
> >
> > I tried table in next types: TIMESTAMP,DATETIME.
> >
> >
>
> There's no such function in MySQL but there is UNIX_TIMESTAMP():
>
> localhost.dread$ grep TO_UNIXTIME $MANUAL
> localhost.dread$ grep UNIX_TIMESTAMP $MANUAL
> `RAND()'. You can, for example, use `UNIX_TIMESTAMP()' for the
> `UNIX_TIMESTAMP()'. Other functions operate on the formatted
> `UNIX_TIMESTAMP()'
> `UNIX_TIMESTAMP(date)'
> `UNIX_TIMESTAMP()' is called with a `date' argument, it returns
>
> <snip>
>
> --
> Don Read [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to
> steal the neighbor's newspaper, that's the time to do it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
But MS SQL SERVER saved all characters. Only first 255 characters was shown
in <textarea>. What's wrong?
Thanks for your input,
Larry
--- End Message ---
--- Begin Message ---
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from_name." <".$from_address.">\r\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
Is this about all i need to send a mail in PHP excluding the mail();
------
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
On 24-Mar-2003 Philip J. Newman wrote:
> $headers .= "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= "From: ".$from_name." <".$from_address.">\r\n";
> $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
> $headers .= "X-Priority: 3\r\n";
> $headers .= "X-MSMail-Priority: Normal\r\n";
> $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
>
> Is this about all i need to send a mail in PHP excluding the mail();
>
>
More than enough.
Couple of thoughts ...
Drop the X-Priority and X-MSMail-Priority. Those are the default values
and thus un-necessary.
Also the <crlf> is over kill; a simple \n will do just fine.
----
The way I usually do it:
$adminemail='Foobaz Administration <[EMAIL PROTECTED]>';
$theprgmr='<[EMAIL PROTECTED]>';
$headers =array(
'List-Id' => SITENAME,
'Cc' => "$adminemail, <[EMAIL PROTECTED]>",
'Sender' => "$adminemail",
'Reply-To' => "$adminemail",
'Bcc' => "$theprgmr",
'From' => "$adminemail"
);
$mailhdrs='';
foreach($headers as $k => $v) {
$mailhdrs .=sprintf("%s: %s\n", $k, $v);
}
mail($mailto, $mailsubj, $mailmsg, $mailhdrs);
>
> ------
> Philip J. Newman.
> Head Developer
> [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Oh, and I hope you're going to consider a multipart/alternative message
body. HTML-only e-mail is evil.
Regards,
--
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
--- End Message ---
--- Begin Message ---
On Monday 24 March 2003 18:35, Don Read wrote:
> On 24-Mar-2003 Philip J. Newman wrote:
> > $headers .= "MIME-Version: 1.0\r\n";
> > $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> > $headers .= "From: ".$from_name." <".$from_address.">\r\n";
> > $headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
> > $headers .= "X-Priority: 3\r\n";
> > $headers .= "X-MSMail-Priority: Normal\r\n";
> > $headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
> >
> > Is this about all i need to send a mail in PHP excluding the mail();
>
> More than enough.
> Couple of thoughts ...
>
> Drop the X-Priority and X-MSMail-Priority. Those are the default values
> and thus un-necessary.
> Also the <crlf> is over kill; a simple \n will do just fine.
<CRLF> is not an overkill. That is the specs. Some MTAs (sendmail in
particular) will treat a single LF (\n) as a line termination as thus you can
get away with it.
Stay with the spec and use <CRLF> (\r\n).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Don't say "yes" until I finish talking.
-- Darryl F. Zanuck
*/
--- End Message ---
--- Begin Message ---
Hi all,
I'm making a bulk send mail program script.
In this script I use an array:
now this works fine: $send_vars = array(
'recipients' => array('[EMAIL
PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]')
);
however the recipients are hardcoded in the script, so I'm trying to catch these in a
variable $emailadress:
$emailadress=array('[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]') ;
$send_vars = array('recipients' => $emailadress);
However this does not work. what is going wrong here??
thx if you can help me!
many regards
WIlbert Enserink
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-------------------------
--- End Message ---
--- Begin Message ---
I'm thinking about starting a cookbook/recipes website and I'm guessing
there's some special skills for handling recipes (ingredients, cooking
times, etc) and I would like to know if there's a PHP based project that is
designed for that kind of the project.
Doing google searches for anything that contains cookbook turn up all kinds
of code repositories...
Jeff.
--- End Message ---
--- Begin Message ---
If I understood correctly, the first time start_session is used, the server
will send both a cookie AND rewrite the links in the page with the sessionid
appended to it. This seems logical since at the first call for a session the
server can not know whether the browser will accept cookies or not. However,
if I enclose the start_session in ob_start() and ob_end_flush() even on the
first page there is no link rewrite (ie no ?phpsessid=... is added to the
links). How can this be explained? With the output buffering the server will
send the cookie right after the flush and perhaps the browser sends back a
kind of acknowledgement before the page can be rewritten by the server?
However I checked the HTTP communication between server and browser and did
not find a significant difference between the case with and without output
buffering. The only thing I saw was a different port being used for some
initial TCP/IP communication. However, I'm not an expert but would like to
know the explanation of this behaviour anyway,
MPL
--- End Message ---
--- Begin Message ---
Hi
What I'd like to do is open an html file, strip out the content between
the <body></body> tags so that I can insert it into my own template.
Has anyone got any good resources or tutorials I could read to help me
accomplish this simple sounding task.
I have no idea where to start! ;o)
Thanks everyone.
Tony
--- End Message ---
--- Begin Message ---
Tony, try searching the archives - the regular expression that's required to
get the stuff between the <body> tags has been asked many, many times
before.
Here's a quick bit of code that might get you started:
<?php
$temp_file = "/tmp/" . uniqid("yahoo");
$myfile = "/path/to/myfile.html";
$file = "http://www.yahoo.com/";
$their_text = implode("", file($file));
# now let's get our match between the body tags.
if(!preg_match("!<body[^>]+>(.*)</body>!is", $their_text, $matches))
{
# No matches?
} else
{
$my_text = $matches[1];
# Copy to temp file first....
$fp = fopen($temp_file, "w");
fwrite($fp, $my_text);
fclose($fp);
if(filesize($temp_file) > 0)
{
# We probably got some good text.
copy($temp_file, $myfile);
} else
{
echo "Something flakey's happened.\n";
}
unlink($temp_file);
}
?>
Have a look at phpbuilder.net for tutorials on this sort of thing - I seem
to remember having seen some tutorials there on this sort of thing not so
long back.
Points of reference:
http://www.php.net/file
http://www.php.net/fopen
http://www.php.net/fread
http://www.php.net/fclose
http://www.php.net/fwrite
http://www.php.net/preg_match
http://www.php.net/preg_replace
James
"Tony Crockford" <[EMAIL PROTECTED]> wrote:
> Hi
>
> What I'd like to do is open an html file, strip out the content between
> the <body></body> tags so that I can insert it into my own template.
>
> Has anyone got any good resources or tutorials I could read to help me
> accomplish this simple sounding task.
>
> I have no idea where to start! ;o)
>
> Thanks everyone.
>
> Tony
>
--- End Message ---
--- Begin Message ---
for an application, i would like to have the temporary upload file directory
under the webroot of this application.
how can i override the php.ini directive of upload_tmp_dir ?
--
roger
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
--- End Message ---
--- Begin Message ---
On Monday 24 March 2003 17:28, Roger Thomas wrote:
You have started a new thread by taking an existing posting and replying to
it while you changed the subject.
That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a "References:" header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view ("tree view") of the postings.
With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.
Always do a fresh post when you want to start a new thread. To achieve this,
click on "New message" instead of "Reply" within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.
> for an application, i would like to have the temporary upload file
> directory under the webroot of this application.
>
> how can i override the php.ini directive of upload_tmp_dir ?
You can't do this dynamically (ie from within PHP). You can set this per
domain/directory using apache directives (if you're using apache of course).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Women professionals do tend to over-compensate.
-- Dr. Elizabeth Dehaver, "Where No Man Has Gone Before",
stardate 1312.9.
*/
--- End Message ---
--- Begin Message ---
I'm using Command Line php and php-xslt functions ( sablotron 0.96 )
I have got an error such that :
php: output.cpp:1554: Bool OutputterObj::eventAttributeStart(Situation &,
const EQName &): Assertion `!"eventAttributeStart"' failed.
Any idea?
Fatih Üstündağ
Yöre Elektronik Yayımcılık A.Ş.
0 212 234 00 90
--- End Message ---
--- Begin Message ---
Hi,
Using the following code i get a parse error for line 137, and i cant see
anything wrong with it, i would be very grateful for someones help here!
if ($num > 0){
if ($values[$i] == 0){
$query = "DELETE FROM WMS_Allocatations WHERE User_ID =
'".$_GET[user_id]."' AND Project_ID = '".$fields[$i]."'";
}
} else {
if ($values{$i] != 0){ //line 137
$query = "INSERT INTO WMS_Allocatations (User_ID, Project_ID) VALUES
('".$_GET[user_id]."', '".$fields[$i]."')";
}
}
thanks in advance for your help
--- End Message ---
--- Begin Message ---
You have a curly brace, where you should have a square bracket:
> if ($values{$i] != 0){ //line 137
if($values[$i]) {
James
"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Using the following code i get a parse error for line 137, and i cant see
> anything wrong with it, i would be very grateful for someones help here!
>
> if ($num > 0){
> if ($values[$i] == 0){
> $query = "DELETE FROM WMS_Allocatations WHERE User_ID =
> '".$_GET[user_id]."' AND Project_ID = '".$fields[$i]."'";
> }
> } else {
> if ($values{$i] != 0){ //line 137
> $query = "INSERT INTO WMS_Allocatations (User_ID, Project_ID) VALUES
> ('".$_GET[user_id]."', '".$fields[$i]."')";
> }
> }
>
> thanks in advance for your help
>
>
--- End Message ---
--- Begin Message ---
At 11:24 24.03.2003, shaun said:
--------------------[snip]--------------------
>Using the following code i get a parse error for line 137, and i cant see
>anything wrong with it, i would be very grateful for someones help here!
>
>if ($num > 0){
> if ($values[$i] == 0){
> $query = "DELETE FROM WMS_Allocatations WHERE User_ID =
>'".$_GET[user_id]."' AND Project_ID = '".$fields[$i]."'";
> }
>} else {
> if ($values{$i] != 0){ //line 137
> $query = "INSERT INTO WMS_Allocatations (User_ID, Project_ID) VALUES
>('".$_GET[user_id]."', '".$fields[$i]."')";
> }
>}
--------------------[snip]--------------------
Shouldn't that be
if ($values[$i] != 0){ //line 137
Note the curly vs. square brackets in $values
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--- End Message ---
--- Begin Message ---
Am talking to a part Bristol City Council in the UK. To persuade them to
use PHP I need to find some high profile reference sites.
Looked on php.net but all the sites were technical support sites, not
really corporate or government sites. This is not very good, the MySQL lot
have a very good list of sites at
http://www.mysql.com/press/user_stories/index.html and the following quote
on there site
"The MySQL database has an estimated 4,000,000 active installations
worldwide, and up to 27,000 copies of MySQL are downloaded per day. Major
corporations such as Yahoo!, Cisco, NASA, Lucent Technologies, Motorola,
Google, Silicon Graphics, HP, Xerox and Sony Pictures rely on MySQL for
heavy-duty, mission-critical applications."
This is exactly the type of thing I need for PHP and am supervised it is
not on the PHP site.
So..
Can anyone give me some sites who use PHP that the people at Bristol city
Council would of heard of (i.e. high profile sites).
Also I think this type of thing should be on php.net.
Ben
****************************************************************
* Ben Edwards +44 (0)117 968 2602 *
* Critical Site Builder http://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online http://www.cultureshop.org *
* i-Contact Progressive Video http://www.videonetwork.org *
* Smashing the Corporate image http://www.subvertise.org *
* Bristol Indymedia http://bristol.indymedia.org *
* Bristol's radical news http://www.bristle.org.uk *
* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 *
****************************************************************
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
--- End Message ---
--- Begin Message ---
"Ben Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Am talking to a part Bristol City Council in the UK. To persuade them to
> use PHP I need to find some high profile reference sites.
>
> So..
>
> Can anyone give me some sites who use PHP that the people at Bristol city
> Council would of heard of (i.e. high profile sites).
It is probably recently overused (and misused), but Yahoo is an example that
they should have heard of. A few months ago Yahoo anounced that they plan to
move to PHP.
rush
--
http://www.templatetamer.com/
--- End Message ---
--- Begin Message ---
We use it here (although you can't tell because we have set up the extension
to be .html)
http://library.open.ac.uk
It queries a mysql database for the metadata as well as building up the
pages.
Mark Bond
Systems Manager
Open University Library
-----Original Message-----
From: Ben Edwards [mailto:[EMAIL PROTECTED]
Sent: 24 March 2003 10:54
To: [EMAIL PROTECTED]
Subject: [PHP] Help me pervade Bristol City council to use PHP
Am talking to a part Bristol City Council in the UK. To persuade them to
use PHP I need to find some high profile reference sites.
Looked on php.net but all the sites were technical support sites, not
really corporate or government sites. This is not very good, the MySQL lot
have a very good list of sites at
http://www.mysql.com/press/user_stories/index.html and the following quote
on there site
"The MySQL database has an estimated 4,000,000 active installations
worldwide, and up to 27,000 copies of MySQL are downloaded per day. Major
corporations such as Yahoo!, Cisco, NASA, Lucent Technologies, Motorola,
Google, Silicon Graphics, HP, Xerox and Sony Pictures rely on MySQL for
heavy-duty, mission-critical applications."
This is exactly the type of thing I need for PHP and am supervised it is
not on the PHP site.
So..
Can anyone give me some sites who use PHP that the people at Bristol city
Council would of heard of (i.e. high profile sites).
Also I think this type of thing should be on php.net.
Ben
****************************************************************
* Ben Edwards +44 (0)117 968 2602 *
* Critical Site Builder http://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online http://www.cultureshop.org *
* i-Contact Progressive Video http://www.videonetwork.org *
* Smashing the Corporate image http://www.subvertise.org *
* Bristol Indymedia http://bristol.indymedia.org *
* Bristol's radical news http://www.bristle.org.uk *
* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 *
****************************************************************
--- End Message ---
--- Begin Message ---
Okay, I'm starting to tie myself in knots with this:
Part of my site carries feature articles held in a MySQL database. I've
written an admin page that allows me to edit the articles in an HTML form
before saving them to the database (using INSERT or UPDATE as appropriate).
On the site, I want users to be able to search using keywords in the
articles.
Now, all of this is basically working, but I'm not sure quite what to do
about special characters. If I use htmlentities on the data when writing it
to the database, then an ampersand will be stored as & and this will
display fine. But then I guess I need to similarly treat search strings if
users' queries are to match properly. Also, if I pull the article into the
editing form, I guess I need to reverse the process with
html_entity_decode() before displaying and editing it, which is getting a
bit convoluted.
Is there any reason why I shouldn't store characters in their natural form
in the database - (eg, store '&' as '&' rather than '&') and then just
use htmlentities to display the text?
I'd be grateful for any opinions.
--- End Message ---
--- Begin Message ---
If you store your text "htmlentitied" in the database, you will need to
apply htmlentities to the search string, but not when you bring the data
back from the database tables (to either display in the text editing screen,
or the normal viewing screen. Example:
<?php $text = "This is a test </textarea>"; ?>
<textarea name="text" cols="50" rows="10" wrap="virtual"><?php echo
$textarea; ?></textarea>
That will not bring a desirable result, without applying htmlentities():
<textarea name="text" cols="50" rows="10" wrap="virtual"><?php echo
htmlentities($textarea); ?></textarea>
I prefer to store text as-is in the database, then perform htmlentities when
retrieving from the database. I tend to keep other text manipulation to
basic one-time tasks, like word breaking (for big chunks of words),
multi-space removal, etc.
James
"Rotsky" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Okay, I'm starting to tie myself in knots with this:
>
> Part of my site carries feature articles held in a MySQL database. I've
> written an admin page that allows me to edit the articles in an HTML form
> before saving them to the database (using INSERT or UPDATE as
appropriate).
>
> On the site, I want users to be able to search using keywords in the
> articles.
>
> Now, all of this is basically working, but I'm not sure quite what to do
> about special characters. If I use htmlentities on the data when writing
it
> to the database, then an ampersand will be stored as & and this will
> display fine. But then I guess I need to similarly treat search strings if
> users' queries are to match properly. Also, if I pull the article into the
> editing form, I guess I need to reverse the process with
> html_entity_decode() before displaying and editing it, which is getting a
> bit convoluted.
>
> Is there any reason why I shouldn't store characters in their natural form
> in the database - (eg, store '&' as '&' rather than '&') and then just
> use htmlentities to display the text?
>
> I'd be grateful for any opinions.
>
>
--- End Message ---
--- Begin Message ---
Does anyone know how to count & check # of user logged on (and not logged off) using
PHP?
Should I use session?
best regards
./pl
--- End Message ---
--- Begin Message ---
This has been discussed before. It depends on what kind of
authentication you use. Sessions are great for this, but you need to use
your own session save handler, save sessions to sql db, and then use
select count(*)
P Lok wrote:
Does anyone know how to count & check # of user logged on (and not logged off) using
PHP?
Should I use session?
best regards
./pl
--- End Message ---
--- Begin Message ---
Thanks!
Could u pls tell me where can I find the said topic?
Is the record in db still valid if the user has disconnected?
rgds
./pl
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This has been discussed before. It depends on what kind of
> authentication you use. Sessions are great for this, but you need to use
> your own session save handler, save sessions to sql db, and then use
> select count(*)
>
> P Lok wrote:
>
> >Does anyone know how to count & check # of user logged on (and not logged
off) using PHP?
> >Should I use session?
> >
> >best regards
> >./pl
> >
> >
> >
>
--- End Message ---
--- Begin Message ---
Hi all,
I'v got the following:
round ($val1,4);
echo "$val1";
It works fine, but when $val which is a float, contains for instance 1.1 I
want it to output 1.1000 instead of just 1.1
I know in C++ this can be done with setprecision(), but I can't seem to find
anything similar in php....please help
Thanks ppl
njoy ur day
--- End Message ---
--- Begin Message ---
number_format
Adriaan Nel wrote:
Hi all,
I'v got the following:
round ($val1,4);
echo "$val1";
It works fine, but when $val which is a float, contains for instance 1.1 I
want it to output 1.1000 instead of just 1.1
I know in C++ this can be done with setprecision(), but I can't seem to find
anything similar in php....please help
Thanks ppl
njoy ur day
--- End Message ---
--- Begin Message ---
You could have also used sprintf, which can be called from C++ as well.
Josh.
On March 24, 2003 07:18 am, Marek Kilimajer wrote:
> number_format
>
> Adriaan Nel wrote:
> >Hi all,
> >
> >I'v got the following:
> >
> >round ($val1,4);
> >
> >echo "$val1";
> >
> >It works fine, but when $val which is a float, contains for instance 1.1 I
> >want it to output 1.1000 instead of just 1.1
> >
> >I know in C++ this can be done with setprecision(), but I can't seem to
> > find anything similar in php....please help
> >
> >Thanks ppl
> >
> >njoy ur day
--- End Message ---
--- Begin Message ---
Dear Online Business Opportunity Seekers
Why CCI ?
CCI, Core Club International is a 3 year old,
Federally registered non-profit humanitarian
aid, corporation.
Federal EIN # 93-1324671
State Reg. # 036394-99
Established April 17, 2000
CCI was set up to help eradicate poverty in the
world beginning with YOU !
>> http://www.adminder.com/c.cgi?formorcash&CCIbm
THE BUSINESS OPPORTUNITY...
Could you use an additional income of $4,000 a
month...every month ?
Step 1
It's as easy as joining CCI for $9.99 and the CCI
upgrade for an additional $9.99...That's a total
of $19.98...For under $20 you can start your own
business which will begin to return a real monthly
income within just a few months.
Step 2
Invite 4 members into CCI just like you...People
who want to be making $4,000 in six months...
Then help your 4 new members do the same as
you...which is find their 4 people who want to be
making $4,000 in six months.
>> http://www.adminder.com/c.cgi?formorcash&CCIbm
That's it...It's that easy... You've now set something
in motion...A boulder tumbling down a hill that will
begin to pick up momentum as it continues, until
it becomes an avalanche !
This is what your avalanche will look like as it
picks up momentum...
1st Month -- Your monthly fees are covered once
you have invited your 4 CCI members at $19.98 each.
2nd Month -- You receive a check for $18.99
3rd Month -- You receive a check for $100
4th Month -- You receive a check for $200
5th Month -- You receive a check for $1,300
6th Month -- You receive a check for $4,000
and every month thereafter !!!
>> http://www.adminder.com/c.cgi?formorcash&CCIbm
THE TOOLS...
We have the tools, 1,000's of training videos,
auto-responders, traffic generators and training
by some of the Internets top marketers on how
to use them.
Let's get started TODAY...The only thing that
stands in your way of $4,000 a month...is 4
people...If you are serious I will help you get
there!
>> http://www.adminder.com/c.cgi?formorcash&CCIbm
Before you go, it's important to know also that CCI,
is the core company of the much awaited MegaOpp.
When MegaOpp launched, the spillovers into CCI will be
massive. Position yourself now.
If you need more info on MegaOpp. Send me an email
and I will be happy to fill you in.
Questions - Email Me...
To Your Success,
Chew Tee Khim
659-638-7345
[EMAIL PROTECTED]
>> http://www.adminder.com/c.cgi?formorcash&CCIbm
Disclaimer For Unsolicited
Email
This message is sent in compliance of the new e-mail bill: SECTION 301. Per
Section 301, paragraph (a)(2)(C) of S. 1618. This message is NOT Spam as
long as you are provided with a way to remove your name from this mailing
list. All further transmissions to you from me may be stopped at no cost to
you by replying to this email with "Remove" in the 'Subject' line.
--- End Message ---
--- Begin Message ---
I'm refering to the type of documentation that mysql and php has on their
websites, where you have chapter headings and sections, and people can look
at a contents pages, or can look at individual sections, or can look at one
massive html file with everything in it or can download the entire
documentation in one tar file. The website allows user comments on each
section to.
There must be a system in place to generate all this automatically from one
central data store .......
What is it, and is it (or something like it) publically avalible somewhere?
If its not already, noone bother yourself digging it out and packaging it on
my account, my projects that small I can do it manually for now.
I found this (
http://www.php.net/manual/howto/chapter-online-generation.html ) but it
doesnt say what the system actually is. As far as I can see, its all
generated somehow from a CVS tree.
-----
James Baster
James at The Sinner dot co dot uk
--- End Message ---
--- Begin Message ---
Can someone help?
I have uploaded my PHP pages, created in Dreamweaver MX to my hosting server
but when I try to access the page the only option I get is to download it.
What am I doing wrong?
I have created the forms and guestbooks that mail information to me but
these do not work, they are OK when I test them locally but not when they
are uploaded.
Thank you
Andy
--- End Message ---
--- Begin Message ---
Server is probably set up wrong or your extensions are wrong. Check with
the ISP wether you have PHP facilities, the extension is .php normally but
sometimes .php3.
At 03:55 24/03/2003 +0000, Andy wrote:
Can someone help?
I have uploaded my PHP pages, created in Dreamweaver MX to my hosting server
but when I try to access the page the only option I get is to download it.
What am I doing wrong?
I have created the forms and guestbooks that mail information to me but
these do not work, they are OK when I test them locally but not when they
are uploaded.
Thank you
Andy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
****************************************************************
* Ben Edwards +44 (0)117 968 2602 *
* Critical Site Builder http://www.criticaldistribution.com *
* online collaborative web authoring content management system *
* Get alt news/views films online http://www.cultureshop.org *
* i-Contact Progressive Video http://www.videonetwork.org *
* Smashing the Corporate image http://www.subvertise.org *
* Bristol Indymedia http://bristol.indymedia.org *
* Bristol's radical news http://www.bristle.org.uk *
* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 *
****************************************************************
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
--- End Message ---
--- Begin Message ---
Hi Ben
They say that the server is set up for PHP4, and they say it is something to
do with my scripts.
Not sure I believe them.
My pages have the extension .php
Andy
"Ben Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Server is probably set up wrong or your extensions are wrong. Check with
> the ISP wether you have PHP facilities, the extension is .php normally but
> sometimes .php3.
>
> At 03:55 24/03/2003 +0000, Andy wrote:
>
> >Can someone help?
> >
> >I have uploaded my PHP pages, created in Dreamweaver MX to my hosting
server
> >but when I try to access the page the only option I get is to download
it.
> >
> >What am I doing wrong?
> >
> >I have created the forms and guestbooks that mail information to me but
> >these do not work, they are OK when I test them locally but not when they
> >are uploaded.
> >
> >Thank you
> >
> >Andy
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>
> ****************************************************************
> * Ben Edwards +44 (0)117 968 2602 *
> * Critical Site Builder http://www.criticaldistribution.com *
> * online collaborative web authoring content management system *
> * Get alt news/views films online http://www.cultureshop.org *
> * i-Contact Progressive Video http://www.videonetwork.org *
> * Smashing the Corporate image http://www.subvertise.org *
> * Bristol Indymedia http://bristol.indymedia.org *
> * Bristol's radical news http://www.bristle.org.uk *
> * PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 *
> ****************************************************************
>
----------------------------------------------------------------------------
----
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>
--- End Message ---
--- Begin Message ---
Hi,
I don't think this's the solution... so take this msg only as info. :)
Same problem can happen with old browsers. Solution is to add ".php" to
MIME-Settings of "text/html". I had this problem with eBay (*.dll) some
times ago. :)
But I think it's a problem with your ISP. If there are errors in your
script you should get Error-Output.
> -----Original Message-----
> From: Andy [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 24, 2003 5:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Viewing PHP pages
> They say that the server is set up for PHP4, and they say it
> is something to
> do with my scripts.
> Not sure I believe them.
> My pages have the extension .php
--- End Message ---
--- Begin Message ---
The use of the standard mail(...) function is just not working and I
would really appreciate some patient soul's time to access:
http://www.up.net/~jolove/PHP/EMail/EmailPHP.phps
and look at the code ... it really is very short ...
The function send() returns success, yet my mail client, Eudora is not
accepting emails when I send mail to myself.
The HTML source which accesses the above .php code is:
http://www.up.net/~jolove/email.phps
Many, many thanks in advance ...
John Love
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi
I'm new (to the list and php) - be gentle on me!
I'm working on a script that will allow a client to send an email message to
an email list that is pulled out of a database(mysql). I've got the script
working sort of..., though it needs more work. Essentially, I
pull the e-mails out of a database, put them all into one string, and then
stick that string into the "to" field using php's mail()
function.
In the e-mail the recipient gets, all of the e-mail addresses are viewable
in the "to:" field.
Is there some way to hide those e-mail addresses?
Many thanks in advance
Jimbo
--- End Message ---
--- Begin Message ---
Hi,
I have some checkboxes on my form and am using the following code to
populate it. The box will be checked if the user is allocated to the
project. My problem is if I uncheck a checkbox and send the form I don't
know what the $project_id is as it returns zero, so I cant delete the
corresponding record, is there a way around this?
while($j < $num){
$project_id = mysql_result($result, $j, Project_ID);
$project_name = mysql_result($result, $j, Project_Name);
echo '<tr>
<td height="30">'.$project_name.':</td>
<td><input name="'.$project_id.'" type="hidden" value="0">
<input name="'.$project_id.'" type="checkbox"
value="'.$project_id.'" ';
$k = 0;
while ($k < $num_elements){
if ($project_id == $project_id2[$k]){
echo 'checked';
}
$k++;
}
echo '></td>
</tr>';
$j++;
}
--- End Message ---
--- Begin Message ---
hi
Could anyone give me an example of a prepare() and execute() that
retrieves a simple dataset as an associative array and then prints it
to the screen? I can only seem to find examples that do an INSERT and I
am having trouble doing the translation.
Thanks
charles
--- End Message ---