Hi frieds!
I have some problems with get values from environment vars controled by php.
I can't get value from $SERVER_ADMIN var. This var is empty.
In apache log file, I have defined ServerAdmin directive, I suppose this
directive references this environment var, but I not sure if it is
The easiest way is to use an SQL query like this;
update your_table set timestamp_field=null;
This sets the timestamp to the current time automagically. You can of
course add a where clause and so on to this query.
Ben
On Monday, November 26, 2001, at 09:27 PM, cosmin laslau wrote:
> I'm us
On Tue, 27 Nov 2001 17:43, Craig Vincent wrote:
>
> What have I done wrong in such a simple bit of code?
> -
>
>
> $browser = $HTTP_USER_AGENT;
> $ip = $REMOTE_ADDR ;
> $db = mysql_connect ( "localhost" , "username" , "password" );
> mysql_select_db ( "database" , $db )
What have I done wrong in such a simple bit of code?
-
Howdy
I copy & pasted your code onto a test HTML page and modified the mysql
commands to appropriately connect to my MySQL server. There was absolutely
no problem with this code
I have this small test page, below, which returns an error -
Parse error: parse error in /usr/local/apache/htdocs/test.php on line 4
on the $browser line, if I comment it out, it returns an error on the $ip
line, etc. I can leave all the php lines out, add an echo statement
in the body to
> I have a script that needs to be able to choose between 3 different
> databases related to a pull down menu. Any ideas about what functions I
> should be looking at
There's really no need for a function. Most ANSI standard SQL servers will
allow you to specify databases on the fly in your que
"if"
something like:
if ($db == 1) connect to db1
else if ($db == 2) connect to db2
else if ($db == 3) connect to db3
would that do?
-Original Message-
From: Marts [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 23, 2001 11:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] S
php-general Digest 27 Nov 2001 06:00:23 - Issue 1018
Topics (messages 75727 through 75747):
Re: php-general Digest 23 Nov 2001 14:10:17 - Issue 1011
75727 by: Andrew Chase
Re: preventing multiple submissions
75728 by: Neil Freeman
Objects and sessions
75729 by:
Hay all,
I have a script that needs to be able to choose between 3 different
databases related to a pull down menu. Any ideas about what functions I
should be looking at
CHeers,
Marty ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
On Tue, 27 Nov 2001 13:57, cosmin laslau wrote:
> I'm using timestamps (God bless the little things) to keep track of
> database updates, so to give users the latest updates by the second.
> Kinda neat. But anyway, the timestamps are in one table, and when
> something is that table is changed, it
This is more of a MySQL question than a PHP question, but...
The TIMESTAMP format in MySQL isn't a read-only field -- you can update the
data with your own timestamp information just like you can any other normal
database field. So, simply create a timestamp using PHP and insert that into
the
I'm using timestamps (God bless the little things) to keep track of database
updates, so to give users the latest updates by the second. Kinda neat. But
anyway, the timestamps are in one table, and when something is that table is
changed, it automatically updates.
However, I have another table
--On Monday, November 26, 2001 04:47:35 PM -0800 Scott Aikin
<[EMAIL PROTECTED]> wrote:
> I've come across a strange problem working backwards with stripslashes
> after running addslashes. I take a string like:
>
> "\t\4"
>
> and run it through addslashes, the result is:
>
> \\t\\4
>
> After gr
I've come across a strange problem working backwards with stripslashes after running
addslashes. I take a string like:
"\t\4"
and run it through addslashes, the result is:
\\t\\4
After grabbing this data from the database and running 'stripslashes', the data comes
out as:
"\t"
without the
> -Original Message-
> From: Oosten, Sjoerd van [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 22, 2001 2:01 AM
> To: '[EMAIL PROTECTED]'
> Subject: [PHP] SQL in Function
>
>
> function Activeyesno($month,$day,$year,$Project_id){
> $dayactief = mktime(0, 0, 0, $month, $day, $year
Bonjour,
L'annuaire Francais Par departement http://www.annuairefrancais.com integre desormais
un moteur de recherche pour affiner vos recherches sur le web.
L'inscription reste gratuite et la validation toujours manuelle. L'adresse
d'inscription est desormais http://inscrip.annuairefrancais.c
On Mon, 26 Nov 2001, Greg Sidelinger wrote:
> Can someone tell me how to store a class in a session var. I want to
There are several things you need to do.
1) include the class definition before you do anything
2) start the session shortly thereafter
3) register a session variable
4) create y
Why are you even using frontpage themes? If you know how to program PHP you
should be above using MS frontpage features... Frontpage is good for a
WYSIWYG editor, but I highly recommend NOT using its proprietary features...
use CSS or something...
Brandon L.
- Original Message -
From: "
I am trying to use PHP3.x and Front Page 2000. I am able to get it to work
o.k. in Frontpage. However, when I rename my *.htm page to a *.php3 page
and click 'Save', it drops all the theme information when I upload it to my
server. Is there an easy way to stop this from happening? I'm not sure
http://www.analog.cx/
Subject: [PHP] Need a script that will read Apache Log files and generate
reports
--
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: [E
Followed those instructions and apache gives an error when I restart:
Syntax error on line 33 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/libphp4.so into server:
/usr/lib/apache/libphp4.so: cannot open shared object file: No such file or
directory
/usr/sbin/httpd
I have looked in
I use 3.7+ that's why I need confirmation, you are using a newer version
I dont' want to untar and find out it's expired, my version of make, that's
all
Thanks
> I learned I need 3.8 at least gnu make for installing this freetype
> which seems mandatory for good fonts with gd/php image creation
>
> ok, so that made me think, which 'make' version on linux (raq 3 fyi)
> would one need for php 4+?
I currently use 3.79.1 of GNU make (Linux slackware and red
I learned I need 3.8 at least gnu make for installing this freetype
which seems mandatory for good fonts with gd/php image creation
ok, so that made me think, which 'make' version on linux (raq 3 fyi)
would one need for php 4+?
I figure it's best to ask then to assume I have what it takes
Thank
> later on I get errors about the class functions being undefined.
> Can anyone please point me in the right direction on how to
> register my objects as session vars.
Class definition *must* be before any session_start() or
sessgion_register() if there are previously stored objects in the
se
Can someone tell me how to store a class in a session var. I want to
test to see if it has been defined and if not create it. I'm having
problems with it right now.
This is what I'm trying currently
temp=1;
}
}
session_start();
if ( !isset( $c )
Have a look at:
http://www.faqts.com/knowledge_base/view.phtml/aid/863/fid/129
May be of some use.
Neil
Derek Mailer wrote:
> I have a problem with a form on my website.
>
> it's part of a shopping cart application, whereby the form consists of a list of
>products and the user enters the qua
You might want to give 'wget' a try - it's a GNU utility for downloading
mirrors of web sites:
http://www.gnu.org/software/wget/wget.html
If you use it with the '-r' and '-k' options it will crawl your site
recursively, and convert absolute links to relative ones in the downloaded
HTML files.
>
php-general Digest 26 Nov 2001 16:59:18 - Issue 1017
Topics (messages 75697 through 75726):
Re: Pulling information out of a MySQL database
75697 by: Martin Towell
75701 by: Tim Thorburn
75709 by: Douglas McKenzie
75710 by: Jon Haworth
Re: Installing PHP 4 o
Thank for your help !
At 08:08 26/11/01 -0700, JSheble wrote:
>Oh really? I know ASP, PHP, ColdFusion and a few others. You really
>shouldn't make such global statements... just because you don't know ASP
>doesn't mean it's not a viable tool, nor is it a good idea as a web
>developer to lock
Anyone have an idea, I know there are perl scripts, but I would have to set up Perl
and other
stuff on my server to do this ... I dont want to. Does anyone know where the access
log
reader/displayer can be found.
__
Do You Yahoo!?
Yahoo! GeoCitie
This ought to do what you want:
";
}
}
}
closedir($dh);
}
dir_print("/home/hmarq");
?>
Caveats:
It's unix style slashes --
Does no error checking -- perms in particular
Hank
On Mon
The thing is that you can send and receive attachments perfectly if you send
directly from an email client such as outlook or webbased mail such as
hotmail.
I have attached my script below
";
$mail_boundary = md5(uniqid(time()));
$mail_headers .= "From: [EMAIL PROTECTED] \n";
Ooops...
I'm just ging mad about a function to recursively scan a directory tree.
Maybe I'm just too stupid, maybe it's just because today is monday, but I
don't get this managed.
Has anybody got a code sniplet the runs from $currentDir recursively through
all directories, does somethin
Oh really? I know ASP, PHP, ColdFusion and a few others. You really
shouldn't make such global statements... just because you don't know ASP
doesn't mean it's not a viable tool, nor is it a good idea as a web
developer to lock yourself into one singular technology. Knowing more than
one mak
looks like your email client at work is not capable of handling the image
(.gif) attachments. check in the help secion of your email client.
HTH
- Original Message -
From: "Caspar Kennerdale" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 8:16 AM
<[EMAIL PROTECTED]> wrote:
> For those running php 4 on raq 3, how did you compile freetype?
>
> ./configure
> make
> make install
>
> or just 2 make's?
Read the INSTALL file for freetype. 2.0.4 says:
make setup
make
make install
Then install PHP with the options you need in ./configure. You'
This is a PHP mailing list, I doubt you'll find anyone who knows, or wants to
know ASP. Why not use PHP for this, and dump ASP (along with the slow,
bug-ridden webserver it runs on [unless you're using Apache::ASP])?
On 26 November 2001 9:00, Jean-Arthur Silve wrote:
> Hi !
>
> I work with s
Hi !
I work with someone who use ASP :-(( ...
Is someone could translate this function to ASP ??
I don't think it's hard, but when you don't know ASP...
function encrypt($str)
{
global $STRCRYPT;
$i = strlen($str);
$newstr="";
for ($j=0;$j<$i;$j++)
{
$car = substr($str,$j,1);
$car = ord($car);
can anyone recommend a site or discussion list relating to email
I have a form to mail script which sends attachments - it all works if I
have my private email address as the recipient,
however if I use my work email address the mail comes out with no attachment
but displays gobbledigook like-
>I want to know where can i find a script that will allow a user to login
>every certain time period!
>I just cant get it right!
Check www.hotscripts.com
Dunno if something exists but you could build one yourself or modify an
existing script..
Bye,
B.
--
PHP General Mailing List (http://
If you want to stop people logging on more than every, say, 24 hours, you
could record the most recent log-on time in a database and then check that
24hrs has passed before another log-on is allowed.
I don't know where you can find a script that does this exactly, but it
wouldn't be hard to hack
Browse the Linux Journal archives. Sometime this year there was an article
on tunig PGSQL for performance.
Miles Thompson
At 02:45 PM 11/26/2001 +0800, you wrote:
>hi,
>
>for php-db list users, i'm not sure if this is off-topic. please
>inform me if it is.
>
>i'd like to ask anyone who have work
At 02:04 PM 11/26/2001 +0200, Rudi Ahlers wrote:
>How would I be able to change a variable from the input in a checkbox? I
>need to write an sms script, that would be able to sms to three different
>providers, and I only want the use to type in the phone number. Thus, if he
>types in 083xx
You could look into the nl2br() function, which converts \n -style newlines
(entered in s) into HTML s.
http://www.php.net/nl2br
HTH
Jon
-Original Message-
From: Tim Thorburn [mailto:[EMAIL PROTECTED]]
Sent: 26 November 2001 07:32
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Pulling infor
Im new to php but I would suggest using a tag to wrap round your
text output. This should keep any formatting. I think.
Tim Thorburn wrote:
> Thanks to everyone for their help - especially Martin, that fixed my
> problem and now all the records (both basic and extended) display properly
How would I be able to change a variable from the input in a checkbox? I
need to write an sms script, that would be able to sms to three different
providers, and I only want the use to type in the phone number. Thus, if he
types in 083xx, it should goto provider 1, if he types in
082xx
I want to know where can i find a script that will allow a user to login
every certain time period!
I just cant get it right!
--
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 admini
Thanx for all the explanations, it did help quite a bit, although I don't
have a use for a class yet, I might just use one to see how it works, and
when to use it, and when not to use it.
Regards
Rudi Ahlers
- Original Message -
From: "Christopher William Wesley" <[EMAIL PROTECTED]>
To:
hi all,
i need to unset a session cookie, i foud out header("Set-Cookie:"); does not
work for a php session (http://bugs.php.net/bug.php?id=14227)
request for clue...
with kind regards,
Joffrey van Wageningen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PR
Something like this ...?
$time = time(); // UNIX timestamp
$filename = $time . ".txt";
$string = "your content here";
$file = fopen("$filename","w");
fputs($file,$string);
fclose($file);
Michael
On Mon, 26 Nov 2001, Kevin Garrett wrote:
> Hi all,
>
> I'm looking to find out how
Hi all,
I'm looking to find out how to create a file using php & using the date &
time as it's filename.
Can somebody please help me?
Kevin
_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
PHP Ge
I have a problem with a form on my website.
it's part of a shopping cart application, whereby the form consists of a list of
products and the user enters the quantity they require of each product in the field
provided. Everything works okay except for the fact that if someone hits the submit
53 matches
Mail list logo