Re: [PHP] Get when it should be Post

2001-08-02 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Christian) wrote:

Are you quoting the attribute in the real markup (method=POST), or is 
like you show below?  (It might help to throw the whole page at an html 
validator either way,'cuz even if that line is syntactically valid, there 
may be something else that's confusing the browser.)

 Thanx, tried capitals but it still submits via GET :-/
 
 Rasmus Lerdorf wrote:
 
 I've been having a problem of late that some of my forms
 which are set to method=post are not submitting by post by via get.
 
  
  I have seen browsers that only do post when it sees, method=POST
  ie. POST vs. post

-- 
CC

-- 
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] Re: Make associative array from two arrays

2001-08-02 Thread elias

same same...
Thought there was a PHP function to do that...instead of looping,

Tim Ward [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 How about ...

 foreach ($keys as $key=$value) $new_array[$value] = $vals[$key];


 Tim
 --
 From:  elias [SMTP:[EMAIL PROTECTED]]
 Sent:  01 August 2001 15:16
 To:  [EMAIL PROTECTED]
 Subject:  Make associative array from two arrays

 Hello!

 I have two arrays:

 $keys = array(a, b, c, d);
 $vals = array(1, 2, 3, 4);

 I would like to get an associative array holding this:
 $aarray = array(a =1, b=2, c=3, d=4);

 I know I can do it with a while loop...but I wonder if there is
 any
 builtin PHP function that can do that.
 Or a better method other than sort of this:

 $aarray = array();
 for ($i=0;$icount($keys);$i++)
 {
   $aarray[$keys[$i]] = $vals[$i];
 }

 thanks!





-- 
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] Re: HTTP_SESSION_VARS

2001-08-02 Thread Jon Yaggie

Actually after an hours nap i found the problem.  It is not something anyone
could have helped me with since i didnt give complete enough code.   the
very simple solution was stupidly i used it in a function without declaring
ir global.  all is good now.


- Original Message -
From: Richard Lynch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 3:17 AM
Subject: [PHP] Re: HTTP_SESSION_VARS


 while (list ($key, $val) = each ($HTTP_session_VARS)) {
 echo $key = $valbr;
 }
 
 i get the error -
 
 Warning: Variable passed to each() is not an array or object in
 /var/www/html/adult/func.php on line 5
 
 and well it looks liek an array to me . . is there soemthing i can do to
 make this work?

 Spell it with SESSION, not session.

 $HTTP_session_VARS ain't nothing unless you set it.

 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm




 --
 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]




Re: [PHP] ad tracking system

2001-08-02 Thread B. van Ouwerkerk

At 11:33 2-8-01 -0500, Jack wrote:
Hi people,
I am looking up for the software that can track all views and click though 
number of all advertising on my sites, has to fit in to my RAQ server 
though. Is there any advice? Don't mind paying of course.

On the risk of a new attitude thread..

Think I did mention freshmeat.net and sourceforge.net before.. also.. check 
your favorite scriptarchive.. do you know there's a link to PHP archive on 
cgi-resources.com?? use a searchengine.. you'll be amazed with the result..

Just did a quick search and saw several promising hits..

Most of this kind of SW is not very big so it should even fit into your 
RAQ. :-)

Bye,



B.


-- 
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] Get when it should be Post

2001-08-02 Thread Christian

FORM  method=POST action={ACTION}

which translates to

form method=POST action=adminMembers_2.php



Rasmus Lerdorf wrote:

 Then you have some silly mistake somewhere.  Show us the URL.
 
 -Rasmus
 
 
Thanx, tried capitals but it still submits via GET :-/

Rasmus Lerdorf wrote:


I've been having a problem of late that some of my forms
which are set to method=post are not submitting by post by via get.


I have seen browsers that only do post when it sees, method=POST
ie. POST vs. post

-Rasmus






 



-- 
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] Re: Hmmm?

2001-08-02 Thread elias

Why you ppl. do this:
  if ($condition) {
//action 1
//action 2
//action 3

  }

instead of this:
  if ($condition)
  {
//action 1
//action 2
//action 3
  }

with the '}' you'll see directly the new code block that belongs to the IF
statment.

anyway...it's just a style after all
Fredrik Arild Takle [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I think it's impossible to read/understand my own scripts if i don't do
it.

 Do:

 ?php
   if ($submit) {
 echo Counting from 1-32br;
 for ($ii = '1'; $ii = '32' $ii++) {
   echo $ii. ;
 }
   }
   echo brAll done!;
 ?

 instead of:

 ?php
 if ($submit) {
 echo Counting from 1-32br;
 for ($ii = '1'; $ii = '32' $ii++) {
 echo $ii. ;
 }
 }
 echo brAll done!;
 ?

 Best Regards
 Fredrik A. Takle

 Keith Jeffery [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Simply indent formatting for readability.  I personally don't indent
after
  the ? tag, but to each his/her own.
 
 
  Kyle Smith [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Whenever i get a php script off a website why is it that most of the
main
  parts in the script have a space from the left border. eg
 
  ?php
  echospazzz;
  ?
 
  
 
  -lk6-
  http://www.StupeedStudios.f2s.com
  Home of the burning lego man!
 
  ICQ: 115852509
  MSN: [EMAIL PROTECTED]
  AIM: legokiller666
 
 
 
 
 





-- 
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] Being a SERVER (you cant kill me, im.... DAMN!!)

2001-08-02 Thread Ralph Guzman

Download a NuSphere release. Depending on which you release you choose, for
the most part these include mySQL, PHP, Apache, and I think Perl. I've found
the setup to be seamless and very simple even for beginners.

http://www.nusphere.com

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 10:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Being a SERVER (you cant kill me, im DAMN!!)

Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666



-- 
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] Re: Being a SERVER (you cant kill me, im.... DAMN!!)

2001-08-02 Thread elias

If you're running Windows system and you've got the windonws 98 SE original
cdrom, you can just install from it PWS from:
CDROMDRIVE:\addons\pws (...)

Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] PHP Extension Documentation?

2001-08-02 Thread Darryl Sokoloski

I'm working on a custom PHP extension in C were I work which is going well
but I can't seem to find any documentation about the subject @ php.net.
Anyone know of such a manual?  A PHP/Zend C API document of some sort - from
an extension developer's point-of-view?

I've tried searching news.php.net, but the search is down - sorry if this
question has already been asked.

Rasmus r0x! (saw you @ TLUG)  Learned many PHP secrets...  Thanx!

Darryl.



-- 
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] PHP_SELF

2001-08-02 Thread Ralph Guzman

Actually there is no need for you to use exit(); If you choose to use this
method cheking for empty fields one at a time rather than all at once; you
can simplify your code a bit as follows:

If($HTTP_POST_VARS){
if(!$Age) { echo Please enter your age; }
elseif(!$Email){ echo Please enter your email; }
else

echo Thanks for your submission;

// continue processing...
...
...
}
}

but in any case, I'm glad I was of help.


-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 12:50 PM
To: PHP
Subject: Re: [PHP] PHP_SELF

Ok, I would like to thank Ralph Guzman  Richard Lynch for your help.
I combined your ideas into my own working example.
Just posting here for archiving/discussion purposes...
// Input some data //
echo form action=\$PHP_SELF\ method=\POST\
enctype=\multipart/form-data\\n;
echo 1.  Age:br\n;
echo nbsp nbspinput type=\text\ name=\Age\ size=\4\
maxlength=\2\ value=\$Age\p\n;
echo 2.  Email:br\n;
echo nbsp nbspinput type=\text\ name=\Email\ size=\25\
maxlength=\30\ value=\$Email\p\n;
echo nbsp nbspinput type=\submit\ name=\submit\
value=\Submit\\n;
// Start error correction //
if (!$HTTP_POST_VARS) { exit(); }
elseif (!$Age) { echo Please enter your age.br\n; }
 elseif (!$Email) { echo Please enter your email.br\n; }
else { echo Thanks for your submission.\n; }
// Do what you want with you sanitised strings //
.. :)

Thanks again guys...




--
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]




[PHP] Fw: detecting mysql

2001-08-02 Thread Jon Yaggie



- Original Message -
From: sarahana [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 6:26 PM
Subject: detecting mysql


 Does anybody here know how to detect with php whether mysql is installed
or
 not.. ? Thanks, I haven't been able to get anything from the other lists..
 sarahana



-- 
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] Fw: detecting mysql

2001-08-02 Thread David Robley

On Thu,  2 Aug 2001 16:24, Jon Yaggie wrote:
 - Original Message -
 From: sarahana [EMAIL PROTECTED]
 To: Jon Yaggie [EMAIL PROTECTED]
 Sent: Thursday, August 02, 2001 6:26 PM
 Subject: detecting mysql

  Does anybody here know how to detect with php whether mysql is
  installed

 or

  not.. ? Thanks, I haven't been able to get anything from the other
  lists.. sarahana

Have you tried phpinfo() ?

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Canadian DOS: Yer sure, eh? [y/n]

-- 
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] SetLocal() problem

2001-08-02 Thread Frédéric Mériot

Thanks a lot, but I must precise that I'm running PHP (4.0.6) under NT2000
(client not server) platform.
'fr_FR.ISO_8859-1' does not work too.

So, it's not very important, but where can I find the entire list of
countries with their ISO code?

Thanks.


- Original Message -
From: Don Read [EMAIL PROTECTED]
To: Frédéric Mériot [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 4:10 AM
Subject: RE: [PHP] SetLocal() problem



 On 01-Aug-2001 Frédéric Mériot wrote:
  Hello, I've got a little problem with the setLocal function. In many
  tutorials they give this syntax:
  setlocale('LC_TIME','fr_FR'); // for france
 
  I tried this but the fr_FR keyword does not seem to work. If I try
  french instead it works.
  I've got the same problem with all other countries keywords (C for
finland,
  pt_BR for portugal ...etc).
  If i do not put the name of a country, it does not work.
 
  Please help!

 Use the full ISO lang.charset definition : 'fr_FR.ISO_8859-1'.
   (Linux allows aliases as defined in locale.alias, that's why french
works).

 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.

 --
 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]




RE: [PHP] Being a SERVER (you cant kill me, im.... DAMN!!)

2001-08-02 Thread B. van Ouwerkerk

At 23:29 1-8-01 -0700, Ralph Guzman wrote:
Download a NuSphere release. Depending on which you release you choose, for
the most part these include mySQL, PHP, Apache, and I think Perl. I've found
the setup to be seamless and very simple even for beginners.

As far as i've seen NuSphere package is running on Linux only.. has been 
reported as being 40Megs.. while the seperate parts are 17Megs only. 
Manuals included..

If you're on Linux then rather download the parts and learn on 
www.devshed.com how to install.. It's easy.. and fun..
A direct link has been provided by another member of this list..

But I think the guy asking this does run on Windooz..

Bye,


B.


-- 
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] MySql help #1

2001-08-02 Thread elias

How can I update only N fields from the database?

usually we do:

UPDATE table1 SET field='VALUE' WHERE condition1

now I want to update fields with a certain condition but only X fields out N
total fields.

ie:

id   value
--- ---
1a
2b
3c
4d
5e

how can i update such like:
UPDATE table1 SET {only 2 records} value='aa'
so I have any two fields now have the 'aa' value





-- 
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] Mysql Help #2

2001-08-02 Thread elias

Hi again.

$result = mysql_query(SELECT id FROM table);
$id_array = array();

while ($r = mysql_fetch_array($result))
   $id_array[] = $r[id];

// now $id_array[] is an array of IDs that was grabbed from the database.

Any faster and/or better approache to build the $id_array?



-- 
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] MySql help #1

2001-08-02 Thread Lawrence . Sheed

Sounds like a strange request, what are you trying to do?

I don't think you can do this directly in mysql, but you could build an
array of results in php.

eg something like (crappy code below)

//Grab results
$db = mysql_connect($db_domain, $db_user,$db_password);
mysql_select_db($db_databasename,$db);
$sqlquery=select ID from table1 where condition1;
$result = mysql_query ($sqlstring,$db);
$count=0;
while ($resultset = mysql_fetch_array ($result)) {
$array[$count]=$resultset [ID];
$count++;
}


for ($count=0;$count2;$count++){
update table1 set field='VALUE' WHERE ID=.$array[$count];
$result = mysql_query ($sqlstring,$db) or die (mysql_error());
}

-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: August 2, 2001 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySql help #1


How can I update only N fields from the database?

usually we do:

UPDATE table1 SET field='VALUE' WHERE condition1

now I want to update fields with a certain condition but only X fields out N
total fields.

ie:

id   value
--- ---
1a
2b
3c
4d
5e

how can i update such like:
UPDATE table1 SET {only 2 records} value='aa'
so I have any two fields now have the 'aa' value





-- 
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]




RE: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-02 Thread Tim Ward

I'd always understood that mysql doesn't allow multiple statements to be
submitted so this post obviously worried me. I did some tests and confirmed
that this is not a problem in MySQL queries from PHP. If I'm wrong about
this please let me know.

Tim

--
From:  scott [gts] [SMTP:[EMAIL PROTECTED]]
Sent:  01 August 2001 18:03
To:  php
Subject:  RE: [PHP] SQL syntax error in PHP script.  dunno what's
wrong 

no offense to you sam, but please dont ever simply place
single quotes around values.  you have to escape the values
*themselves*.

what if someone submitted the form field title as:
$title = '; DELETE FROM seminar; 

if you didn't escape the single quotes in there, it
would get interpreted as a valid DELETE statement
and your seminar table would get wiped.

however, if you escaped $title, you'd end up setting
title to \'; DELETE FROM SEMINAR;  
(rather than have the contents of $title interpreted
as SQL commands)

 -Original Message-
 From: Sam Masiello [mailto:[EMAIL PROTECTED]]
 Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
wrong 
 
 
 You will need to put single quotes around your variables in your
SQL
 statement.  Like this:
 
 $sql = UPDATE TABLE seminar SET

title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
 ilding'
 ,rm='$room'  WHERE id='$id';
 
 Without the quotes, SQL doesn't know that Something Amazing is
supposed to
 go together in the same string.
 
 HTH


-- 
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] Very strange problem with session files

2001-08-02 Thread Jarek

I have WindowsNT4 Serv  PHP 4.0.6/CGI

My php.ini includes:
(...)
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
(...)

Problem: When I run PHP script which uses sessions (commands like session_start()
etc.) the session file IS created in /tmp BUT cannot be received and
added to my URL. My browser (IE5.5PL SP1) receives message:

 Warning: Failed to write session data (files). Please verify that
 the current setting of session.save_path is correct (/tmp) in
 I:\(...)\test.php on line 0

I checked. The session data was created! I CAN read them directly by
another script also in PHP:

(...)
?
  $fd = fopen($path/$filename, r) or die(h3Cannot read $path/$filename/h3);
  print fread($fd, filesize($path/$filename));
  fclose($fd);
?

It seams very strange. PHP do create session data but display error
Failed to write. What can be incorrect with session.save_path? I
checked, the session data is created correctly. I can read that file.
What is goin' on? Anybody can help?
--
Jarek


-- 
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] Re: Being a SERVER (you cant kill me, im.... DAMN!!)

2001-08-02 Thread MindHunter

Hi,

Two things:

1.  PWS from the CD has a bug, you need to get the patch from MS.  The
problem is with the MTS.
2.  I use Badblue www.badblue.com for easy, fast development.   I also
recommend Apache above IIS or PWS.

Cheers
BK

Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Where do i download the best software (prefebly free) to set up my computer
as a server so i can test my php scripts? (apache or whatever)


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] ---- is being an ass!

2001-08-02 Thread Kyle Smith



Ok have installed PHPTriad, when i run apache 
(gulp) dos opens, all fine BUT when i run PHP.exe well look down (sorry if 
im not allowed to post pictures but, its small!)




-lk6-http://www.StupeedStudios.f2s.comHome 
of the burning lego man!

ICQ: 115852509MSN: [EMAIL PROTECTED]AIM: 
legokiller666




Re: [PHP] MySql help #1

2001-08-02 Thread elias

Someone purchased items from my site let's say 3 items out of 5 total. All
items are the same. I just want to update 3 items status to Reserved.
When he buy he just tell how many and not which ones.

Lawrence Sheed [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
 Sounds like a strange request, what are you trying to do?

 I don't think you can do this directly in mysql, but you could build an
 array of results in php.

 eg something like (crappy code below)

 //Grab results
 $db = mysql_connect($db_domain, $db_user,$db_password);
 mysql_select_db($db_databasename,$db);
 $sqlquery=select ID from table1 where condition1;
 $result = mysql_query ($sqlstring,$db);
 $count=0;
 while ($resultset = mysql_fetch_array ($result)) {
 $array[$count]=$resultset [ID];
 $count++;
 }


 for ($count=0;$count2;$count++){
 update table1 set field='VALUE' WHERE ID=.$array[$count];
 $result = mysql_query ($sqlstring,$db) or die (mysql_error());
 }

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: August 2, 2001 4:30 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] MySql help #1


 How can I update only N fields from the database?

 usually we do:

 UPDATE table1 SET field='VALUE' WHERE condition1

 now I want to update fields with a certain condition but only X fields out
N
 total fields.

 ie:

 id   value
 --- ---
 1a
 2b
 3c
 4d
 5e

 how can i update such like:
 UPDATE table1 SET {only 2 records} value='aa'
 so I have any two fields now have the 'aa' value





 --
 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]




Re: [PHP] ---- is being an ass!

2001-08-02 Thread Alexander Wagner

Kyle Smith wrote:
 Ok  have installed PHPTriad, when i run apache (gulp) dos opens, all fine
 BUT when i run PHP.exe well look down (sorry if im not allowed to post
 pictures but, its small!)

That attachment was apperantly chopped off.

If you want to post a file on this list, just upload it (your sure got some 
webspace, don't you) and post a link. Saves a lot of bandwidth.

regards
Wagner

-- 
Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously.
 - Cincinnati Enquirer   

-- 
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] MySql help #1

2001-08-02 Thread Lawrence . Sheed

Have you thought about your database design carefully?

You might want to create a column for item count  

eg

id, item name, items in stock 
1,  frog,  7

if, say a customer orders 3 frogs, decrement the items in stock by 3.

Just an idea...

Do you know about database normalization?  How is the database designed?



-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: August 2, 2001 6:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySql help #1


Someone purchased items from my site let's say 3 items out of 5 total. All
items are the same. I just want to update 3 items status to Reserved.
When he buy he just tell how many and not which ones.

Lawrence Sheed [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
...
 Sounds like a strange request, what are you trying to do?

 I don't think you can do this directly in mysql, but you could build an
 array of results in php.

 eg something like (crappy code below)

 //Grab results
 $db = mysql_connect($db_domain, $db_user,$db_password);
 mysql_select_db($db_databasename,$db);
 $sqlquery=select ID from table1 where condition1;
 $result = mysql_query ($sqlstring,$db);
 $count=0;
 while ($resultset = mysql_fetch_array ($result)) {
 $array[$count]=$resultset [ID];
 $count++;
 }


 for ($count=0;$count2;$count++){
 update table1 set field='VALUE' WHERE ID=.$array[$count];
 $result = mysql_query ($sqlstring,$db) or die (mysql_error());
 }

 -Original Message-
 From: elias [mailto:[EMAIL PROTECTED]]
 Sent: August 2, 2001 4:30 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] MySql help #1


 How can I update only N fields from the database?

 usually we do:

 UPDATE table1 SET field='VALUE' WHERE condition1

 now I want to update fields with a certain condition but only X fields out
N
 total fields.

 ie:

 id   value
 --- ---
 1a
 2b
 3c
 4d
 5e

 how can i update such like:
 UPDATE table1 SET {only 2 records} value='aa'
 so I have any two fields now have the 'aa' value





 --
 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]

-- 
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] ----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!

2001-08-02 Thread Kyle Smith

(the damn thing took my attatchement off!!!)

Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine BUT when i 
run PHP.exe well look down

http://www.stupeedstudios.f2s.com/probs.gif


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





RE: [PHP] URGENT!!! Can't start Apache with php4 and mysql

2001-08-02 Thread Mark Roedel

 -Original Message-
 From: Richard Kurth [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 5:36 AM
 To: php
 Subject: [PHP] URGENT!!! Can't start Apache with php4 and mysql
 
 
 I have read the archives for this problem but I can't seam 
 to fix it.  This is on a RedHat 7.  I get this error when I
 try to start Apache

 Starting httpd: Syntax error on line 256 of /etc/httpd/conf
 /httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
  libmysqlclient.so.10: cannot open shared object file: No such file
   or directory
 
  What I have read is to add the path to libmysqlclient.so.10 to the
  /etc/ld.so.conf file and then run  ldconfig. at root

 I did this but ldconfig does not run.  I keep getting No such
 file or directory

If it's not in your normal search path, you might nead to provide the
full path to the ldconfig program.  I'm not sure where it normally lives
on a Redhat system, but on my FreeBSD box, it's in /sbin.

An alternative, of course, if you can't get things working the other
way, is simply to copy libmysqlclient.so.10 to one of the locations that
was already in your ld.so.conf (that is, somewhere that ld already knows
about)...


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
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] PHPTriad users

2001-08-02 Thread Kyle Smith

Could someone please help me sort out a database on this so i can find out if php 
works, OR could you people please send me any scripts you have cause i just got php 
working on my pc and i wanna know what its capable of.


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





RE: [PHP] PHP-Linux Sybase-Windows

2001-08-02 Thread Andrew Hill

Veniamin,

You can use OpenLink's Multi-Tier ODBC drivers for this.

Compile PHP --with-iodbc as per the HOWTO at www.iodbc.org.
The presence of the iODBC Driver Manager will let you use any ODBC drivers,
and then you can do compariative testing.

Our drivers download with a free non-expiring 2-user license, and free
support is available at http://www.openlinksw.com/support/suppindx.htm.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Veniamin Goldin [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 6:14 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP-Linux  Sybase-Windows


 Hi !

 Wich odbc (and how to set it) is bettet to use to connect to
 remote Sybase DB server from PHP on Linux?



-- 
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] URGENT!!! Can't start Apache with php4 and mysql

2001-08-02 Thread Miles Thompson

Richard,

I've sometimes had to take a couple of swipes at this, trying both
/usr/local/mysql/lib
and
/usr/local/mysql/lib/mysql

And does libmysqlclient.so.10 have a symlink to something like
libmysqlclient.so.10.0.0

And because I just checked a second machine, where mysql is installed in a 
completely different location, have you done a locate to confirm that 
libmysqlclient is where you expect?

I know, it's like checking for gas in the tank, but sometimes 

Cheers - Miles

At 03:36 AM 8/2/01 -0700, Richard Kurth wrote:
I have read the archives for this problem but I can't seam to fix it
   This is on a RedHat 7
   I get this error when I try to start Apache
Starting httpd: Syntax error on line 256 of /etc/httpd/conf
/httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
  libmysqlclient.so.10: cannot open shared object file: No such file
   or directory

  What I have read is to add the path to libmysqlclient.so.10 to the
  /etc/ld.so.conf file and then run  ldconfig. at root
  I did this but ldconfig does not run
  I keep getting No such file or directory


  This is what my ld.so.conf file looks like
/usr/X11R6/lib
/usr/kerberos/lib
/usr/lib
/usr/local/mysql
/usr/local/mysql/lib/mysql --This is were   libmysqlclient.so.10 is


   I really need to get this working





Best regards,
  Richard
mailto:[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]


-- 
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] Replacing template variables with values?

2001-08-02 Thread scott [gts]

try using single quotes :

preg_replace(/\$(\w+)/e, '${$1}', $template);

 -Original Message-
 From: Ryan Fischer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 01, 2001 6:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Replacing template variables with values?
 
 
 Hello!  :)
 
 I have a form with a textarea that contains a template e-mail with
 variables in it.  I would like to be able to replace those variables
 with values.  The variables named in the template are actual variables
 in my script.  This doesn't seem to work:
 
 $newmail = preg_replace(/\$(\w+)/e, ${$1}, $template);
 
 ...and neither does anything I've tried to do as far as eval() goes.  I
 either get a parse error like this:
 
 Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
 c:\path\file.php on line 16
 
 ...or some other sort of eval() error.  Any ideas?  TIA!  :)
 
 --
  -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
 
 
 
 -- 
 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]




[PHP] Re: re:mysql help #1

2001-08-02 Thread elias

Thanks!
That was exactly what I was looking for!


Andras Balogh [EMAIL PROTECTED] wrote in message
news:011f01c11b39$174c0b70$[EMAIL PROTECTED]...
Hi,

Use limit :

update mytable set status='Reserverd'  where purch_id=1 limit 3;

This is mysql specific i think so it won't work with other db.

Best wishes,

Andras.

elias [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Someone purchased items from my site let's say 3 items out of 5 total. All
 items are the same. I just want to update 3 items status to Reserved.
 When he buy he just tell how many and not which ones.






-- 
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] How to Compare dates?

2001-08-02 Thread Rasmus Lerdorf

 if ( (  mysql_result($db_result,$db_record,'order_date')=00)

Uh, huh?  Just try ==0 there.  Not =000

-Rasmus


-- 
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] ----- BEING AN ASS CLICK HERE NOT ABOVE!!!!!

2001-08-02 Thread Lawrence . Sheed

Oops, Correction - You'll need to run apache first, leave it running, and
then try the below.

not enough coffee today...

-Original Message-
From: Sheed, Lawrence -SHNGI -AG 
Sent: August 2, 2001 5:51 PM
To: 'Kyle Smith'; [EMAIL PROTECTED]
Subject: RE: [PHP] - BEING AN ASS CLICK HERE NOT ABOVE!


Kyle,

Apache runs as a background program.

When you've installed apache, and php, you don't actually run them from the
commmand line.

What you have to do is open up a browser window, and point it to your
computer.

Open up Internet Explorer (you're running windows it looks like),

and type in  http://127.0.0.1  or http://localhost

This should bring up a screen saying you've installed apache correctly.

If apache is installed in the default directories, then most likely you'll
need to put some webpages into

c:\apache\htdocs

I would recommend making a file called test.php with the following lines in

?php

phpinfo();

?

Save it into c:\apache\htdocs

now go to your webbrowser, and go to  http://localhost/test.php

If php shows the phpinfo screen then you've installed everything correctly.
If it doesn't work, we'll need to look at your apache settings and php
settings.  Try the stuff above first, then tell me what happens.

Cheers,

Lawrence.

-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: August 3, 2001 1:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] - BEING AN ASS CLICK HERE NOT ABOVE!


(the damn thing took my attatchement off!!!)

Ok I have installed PHPTriad, when i run apache (gulp) dos opens, all fine
BUT when i run PHP.exe well look down

http://www.stupeedstudios.f2s.com/probs.gif


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666



-- 
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] Adopt A Newbie (ME)

2001-08-02 Thread Inércia Sensorial


Kyle Smith [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 zillion is actually a number?

  Yes, a number performed by some old cartoon, anime style :-)

 i just downloaded a program which reads out
 text for you cause it just gets really boring reading the text, so now its
 goinfg to be like having a techer in the room... you got a gun?

  A Zillion gun? In fact I do!

  Okay Kyle. I know the list is an amazing place to solve your doubts. By I
highly recommend you read some tutorials first. Go to www.hotscripts.com/PHP
, section 'Tips and Tutorials', and read, maybe on this order:

1) Introduction to PHP, Form Processing, Data and Time, Counters, Mailing
Lists, Database-Related, Sessions.

  If you go for it (reading), you can finish them in 3 or 4 days. In one
week, almost all of your previous asked questions here will be answered.
That's not only to save our bandwith, but, you sure need to develop other
ways to find the information you need on the internet ;-)



 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666


 - Original Message -
 From: B. van Ouwerkerk [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, August 02, 2001 6:53 AM
 Subject: Re: [PHP] Adopt A Newbie (ME)


  At 13:36 2-8-01 -0700, Kyle Smith wrote:
  Ok, im trying to cut down on the posts here but this time im really
 stuck,
  so could somebody guide me through the usage of mySQL and PHP and show
me
  how to input data into a mySQL database and read it, or just redirect
me
  to another page (which is what normally happens)
  
  NOTE: i am using phpMyAdmin
 
  www.devshed.com
  php newbie php beginner phpbuilder
 
  Just go through the tutorials.. you'll see.. much more fun then sending
a
  zillion messages to this list.
 
  Bye,
 
 
  B.
 
 
  --
  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]




Re: [PHP] SQL syntax error in PHP script. dunno what's wrong

2001-08-02 Thread mike cullerton

hmmm, i am seeing the same thing as tim here. are we doing something wrong?
i created a test table, entered some dummy data and then using scott's
example of '; DELETE FROM seminar;  i tried executing

  insert into test values (0,''; DELETE FROM test; ',1);

and got this error

 ERROR 1064: You have an error in your SQL syntax near '' at line 1

trying other variations either caused similar errors or added rows to my
table.

is it possible to sneak in a command in this manner?

mike

on 8/2/01 2:39 AM, Tim Ward at [EMAIL PROTECTED] wrote:

 I'd always understood that mysql doesn't allow multiple statements to be
 submitted so this post obviously worried me. I did some tests and confirmed
 that this is not a problem in MySQL queries from PHP. If I'm wrong about
 this please let me know.
 
 Tim
 
 --
 From:  scott [gts] [SMTP:[EMAIL PROTECTED]]
 Sent:  01 August 2001 18:03
 To:  php
 Subject:  RE: [PHP] SQL syntax error in PHP script.  dunno what's
 wrong 
 
 no offense to you sam, but please dont ever simply place
 single quotes around values.  you have to escape the values
 *themselves*.
 
 what if someone submitted the form field title as:
 $title = '; DELETE FROM seminar; 
 
 if you didn't escape the single quotes in there, it
 would get interpreted as a valid DELETE statement
 and your seminar table would get wiped.
 
 however, if you escaped $title, you'd end up setting
 title to \'; DELETE FROM SEMINAR; 
 (rather than have the contents of $title interpreted
 as SQL commands)
 
 -Original Message-
 From: Sam Masiello [mailto:[EMAIL PROTECTED]]
 Subject: RE: [PHP] SQL syntax error in PHP script. dunno what's
 wrong 
 
 
 You will need to put single quotes around your variables in your
 SQL
 statement.  Like this:
 
 $sql = UPDATE TABLE seminar SET
 
 title='$title',speaker='$speaker',event_date='$tdate',time='$time',bldg='$bu
 ilding'
 ,rm='$room'  WHERE id='$id';
 
 Without the quotes, SQL doesn't know that Something Amazing is
 supposed to
 go together in the same string.
 
 HTH
 


-- mike cullerton



-- 
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] Re: Spot the difference?

2001-08-02 Thread Inércia Sensorial


  FUD!

Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Whats the difference between ASP and PHP cause ASP has gotta have something
good about it cause microsoft uses it!


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666






-- 
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] shtml or php ??

2001-08-02 Thread Dave.O

I have tried the virtual() command but keep receiving error - undefined
function, can someone give an example in how to use this ?

- Original Message -
From: Dave.O [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 4:26 PM
Subject: [PHP] shtml or php ??


 Which is the best language to use, php or shtml, I use only a couple of
SSI
 commands in shtml to call in headers and footers, and run cgi scripts as
 below.  I thought maybe as I am getting more into php that I should change
 the files from shtml to php, and use the equivalent commands to call in
 headers, footers and run external .cgi programs.  But as below cant see
how
 to load in an external .cgi program into php, as you can see below.

 I am presently using an shtml file using !--#include file=my.htm--
 which work fine and in php I can use the include('my.htm'); command.

 in one of my shtml  i use the !--#exec cgi=my.cgi-- command, but how
do
 I run an external .cgi script from php, I have looked at many of the
 commands such as include(), system(), passthru() , but cant find away to
do
 it.  Can someone help ??

 Is it best for me to leave it in shtml as I have also discovered that SSI
 will not parse inside an html section in php.  Which of these shtml, or
php
 uses more resources on the server ?  Which is the best solution to my
 problem ??

 Regards


 Dave





 --
 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]




[PHP] shtml or php ??

2001-08-02 Thread Dave.O

Which is the best language to use, php or shtml, I use only a couple of SSI
commands in shtml to call in headers and footers, and run cgi scripts as
below.  I thought maybe as I am getting more into php that I should change
the files from shtml to php, and use the equivalent commands to call in
headers, footers and run external .cgi programs.  But as below cant see how
to load in an external .cgi program into php, as you can see below.

I am presently using an shtml file using !--#include file=my.htm--
which work fine and in php I can use the include('my.htm'); command.

in one of my shtml  i use the !--#exec cgi=my.cgi-- command, but how do
I run an external .cgi script from php, I have looked at many of the
commands such as include(), system(), passthru() , but cant find away to do
it.  Can someone help ??

Is it best for me to leave it in shtml as I have also discovered that SSI
will not parse inside an html section in php.  Which of these shtml, or php
uses more resources on the server ?  Which is the best solution to my
problem ??

Regards


Dave





-- 
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] UDP Port listening, can it be done?

2001-08-02 Thread William Bailey

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi All,

I'm currently just playing around with a few things and want to
write a script that will listen on a UDP port and then log/process the
information. The problem i have it that i don't know if php can do this. I
know that you can connect to a UDP port but can you listen on one? And if
you cant then does anybody know if this is planned in a future version?

Thanks,
William.

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBO2lqeq39EoU2VrU1EQL9sQCffH2muCquVf0z7RxZXMICeJrQ1LIAnAnr
i/a5lvWWWHnwUozPHP+r8QP1
=Divy
-END PGP SIGNATURE-



-- 
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] Spot the difference?

2001-08-02 Thread Kyle Smith

Whats the difference between ASP and PHP cause ASP has gotta have something good about 
it cause microsoft uses it!


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] What would you want in a PHP web host?

2001-08-02 Thread mike cullerton

on 8/1/01 11:22 PM, Richard Lynch at [EMAIL PROTECTED] wrote:

 caveat--if there are some options that most folks would reasonably call
 'optional' or 'dangerous', these shouldn't be expected. i am pretty new at
 programming and php, so i have no idea if things like this exist. i
 personally only compile in the options i use.
 
 There are like 107 PHP third-party extensions.

i was really only talking about the features and packages that come with the
php distribution (mysql, snmp, gd, imap, etc) i may have misunderstood the
question.

 
 A couple are pretty new/raw, a couple are pretty defunct, and some are just
 so damn esoteric or have such a small user-base as to be pointless to
 install unless you really know a customer wants it...
 
 Anticipating what customers want can be tricky, though...

:)

 
 You can now compile PHP and later on add in PHP Extension Modules which is
 cool...  I've done it with GD once, but it doesn't seem stable, or maybe I'm
 doing something funky in the PHP code, as it displays one image only 20%
 (ish) of the time.  I'll add GD for real later, but 20% is fine for the
 proof-of-concept I'm working on right now.
 
 Anyway, you may be able to add in new PHP extensions without re-compiling
 everything, but you'll need to check up on the stability issue.

this is cool to know, thanks.


-- mike cullerton   


-- 
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] Syntax

2001-08-02 Thread BRACK

Hi,

I'm in a process of doing site with MySQL database, and most of 
the code I plased in index.php3 (in one file) but I've got some 
problems with statements:

I have:
if (isset(...)) {
...
}
elseif (isset(...)) {
...
}
elseif (isset(...)) {
...
}
else {
...
}

IT DOESNT WORK!

but when I do:

if (isset(...)):
...
elseif (isset(...)):
...
elseif (isset(...)):
...
else:
...
endif;

It works, please tell me what a difference? what do I do wrong that 
firs variant doesn't work?

Yury

-- 
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] Mysql join and aliasing with mysql_fetch_object()

2001-08-02 Thread rkirk.com Mail

I'm using a query similar to:

select tableA.*, tableB.* from tableA,
left join tableB ON tableA.keyfield = tableB.keyfield

When I then try to access the column keyfield, after using
mysql_fetch_object() e.g.

$resultObject-keyfield

I get no value returned. What is the correct way to reference a field/column
that has the same name (as it's a primary and foreign key) on both tables?
Is there some syntax like:

$resultObject-tableA.keyfield ?

I've tried specifically aliasing the field on tableA e.g.

select tableA.*, tableA.keyfield AS myKeyField, tableB.* from tableA,
left join tableB ON tableA.keyfield = tableB.keyfield

and then using $resultObject-myKeyField but that doesn't seem to work
either.
I can't find any useful info/examples about this on the PHP site.

Also if I change the query to be:

select tableA.*, tableB.* from tableA, tableB
left join tableB ON tableA.keyfield = tableB.keyfield

adding the joined table to the FROM clause I get an error. Surely this is
the correct syntax and if anything my initial syntax should fail! Am I not
understanding this correctly or is my mySQL manual out of sync?

Please help
Thanks





-- 
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] newbie question - apache-win2K-authentication

2001-08-02 Thread Shari Fletcher

Hi all ---

I'm having some trouble getting basic authentication working.  Either that
or my privileges are screwed up, or something.

I am running Apache on Windows 2000 and PHP4.  I've searched newsgroups,
this mailing list, various FAQs and the manual, I think my eyes are
crossing.  I've got a feeling either its so simple I can't see it, or its
not possible.  I'm hoping someone has a quick idea about what's going on.

Here's my story:

My authentication script is from this example.

If I leave it as is, I can authenticate and I receive the error:

malformed = header from script. Bad header=3DHTTP/1.0 401 Unauthorized:
=e:/php/php.exe

If I change the unauthorized header to this:  header(Status: 401
Unauthorized);  I cannot authenticate, though the user id and password is
correct.


Thanks in advance !
Shari


My script:

if (!isset($PHP_AUTH_USER)) {

// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm=securedf');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}

// If not empty, display values for variables

else {

echo 
PYou have entered this username: $PHP_AUTH_USERbr
You have entered this password: $PHP_AUTH_PWbr
The authorization type is: $PHP_AUTH_TYPE/p
;
}


-- 
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] shtml or php ??

2001-08-02 Thread Rasmus Lerdorf

 Which is the best language to use, php or shtml, I use only a couple of SSI
 commands in shtml to call in headers and footers, and run cgi scripts as
 below.  I thought maybe as I am getting more into php that I should change
 the files from shtml to php, and use the equivalent commands to call in
 headers, footers and run external .cgi programs.  But as below cant see how
 to load in an external .cgi program into php, as you can see below.

See http://php.net/virtual

-Rasmus


-- 
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] SetLocal() problem

2001-08-02 Thread Don Read


On 02-Aug-2001 Frédéric Mériot wrote:
 Thanks a lot, but I must precise that I'm running PHP (4.0.6) under NT2000
 (client not server) platform.
 'fr_FR.ISO_8859-1' does not work too.
 
 So, it's not very important, but where can I find the entire list of
 countries with their ISO code?
 

It's not an exact country = locale assignment.

language_dialect.characterset

de_DE.DIS_8859-15Deutsch (as used in Germany) in the DIS_8859-15 charset.
de_CH.ISO_8859-2 Deutsch ( Swiss dialect) in a ISO_8859-2 charset.

 --- 

On Unix boxes the supported locales are usually in
/usr/local/share/locale.

For Windows, a search on Google turned up:
http://www.microsoft.com/globaldev/FAQs/Locales.asp

My 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.

-- 
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] URGENT!!! Can't start Apache with php4 and mysql

2001-08-02 Thread Richard Kurth

   I have read the archives for this problem but I can't seam to fix it
  This is on a RedHat 7
  I get this error when I try to start Apache
Starting httpd: Syntax error on line 256 of /etc/httpd/conf
/httpd.conf: Cannot load /etc/httpd/modules/libphp4.so into server:
 libmysqlclient.so.10: cannot open shared object file: No such file
  or directory

 What I have read is to add the path to libmysqlclient.so.10 to the
 /etc/ld.so.conf file and then run  ldconfig. at root
 I did this but ldconfig does not run
 I keep getting No such file or directory
 

 This is what my ld.so.conf file looks like
/usr/X11R6/lib
/usr/kerberos/lib
/usr/lib
/usr/local/mysql
/usr/local/mysql/lib/mysql --This is were   libmysqlclient.so.10 is


  I really need to get this working





Best regards,
 Richard  
mailto:[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]




Re: [PHP] Adopt A Newbie (ME)

2001-08-02 Thread John Monfort



 ...And if all else fails, try www.webmonkey.com, devshed.com or search
 for 'mysql tutorials' on google.com.

 If you need a desktop reference, then I recommend the following books:

   'MySQL and mSQL' -- by O'Reilly

   'PHP Professionals'--published by WROX.



__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Thu, 2 Aug 2001, Werner Stuerenburg wrote:



 Kyle Smith schrieb am Donnerstag, 2. August 2001, 22:36:57:

  Ok, im trying to cut down on the posts here but this time im really stuck, so 
could somebody guide me through the usage of mySQL and PHP and show me how to input 
data into a mySQL database and read
  it, or just redirect me to another page (which is what normally happens)

  NOTE: i am using phpMyAdmin

 Fine. There is a readme. You have to insert your secret data into
 config.inc.php so that phpMyAdmin can connect. If it does, there
 are forms to put your stuff into and then: click the Go button.
 You can't go wrong with this.



 --
 Herzlich
 Werner Stuerenburg

 _
 ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
 Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
 http://pferdezeitung.de



 --
 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]




RE: [PHP] another REGEX question

2001-08-02 Thread Jack Dempsey

Try
$str = preg_replace(p.*?,  ,$str);

jack

-Original Message-
From: Julian Simpson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 02, 2001 5:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] another REGEX question

I have a string can look like either of the following:
psome stuff/p 
p align = leftsome stuff/p

I want to use eregi_replace to take out the first p tag whether it be
p or p align.. with a space

I assumed that $str = eregi_replace (p.*,  ,$str);
but it matches the entire string and thus turns the whole string into
one space.
aparently regex will match the biggest possible match rather than the
smallest
my question is how do i get it to match the smallest.

thanx in advance..

Julian


-- 
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]




Re: [PHP] Spot the difference?

2001-08-02 Thread Tom Carter

A fairly detailed disucission, altho slightly out of date

http://php.resourceindex.com/Documentation/Reviews_and_Analysis/PHP_vs._ASP/

and one on the dangers of advocacy

http://www.perl.com/pub/a/2000/12/advocacy.html


-- 
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] How to Compare dates?

2001-08-02 Thread scott [gts]

it also appears that you're checking for the same thing
over and over and over

'0' is the same as 0
and 00 is the same as 0
and 00 is the same as '00'

try checking for either 0 or -00-00


 -Original Message-
 From: Tim [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 12:23 PM
 To: Jack Sasportas
 Cc: php
 Subject: Re: [PHP] How to Compare dates?
 
 
 To my eyeballs, it looks like you have too many closing parenthesis on
 all of those examples.
 
 - Tim
 
 On 02 Aug 2001 12:08:22 -0400, Jack Sasportas wrote:
  OK I actually tried several things prior to the post, here are some of them and
  the errors
  
  if ( (  mysql_result($db_result,$db_record,'order_date')==0) ) ) {
  if ( (  mysql_result($db_result,$db_record,'order_date')==0) ) ) {
  if ( (  mysql_result($db_result,$db_record,'order_date')=='0') ) ) {
  -or-
  if ( (  mysql_result($db_result,$db_record,'order_date')==00) ) )
  {
  if ( (  mysql_result($db_result,$db_record,'order_date')==00) ) ) {
  -or-
  if ( (
  mysql_result($db_result,$db_record,'order_date')==strtotime(00)) )
  ) {
  
  Parse error is the result in all these attempts...with quotes, single or double,
  no quotes, zero or multiple zeros...by the way the timestamp returns all those
  zeros so I was being specific
  
  Any ideas ?
  
  Thanks !
  
  
  
  
  
  Johnson, Kirk wrote:
  
Can someone tell me how to properly compare the value
returned from the
db to see if it is blank ?
  
if ( (
mysql_result($db_result,$db_record,'order_date')=00)
) ) {
  
   Two things, Jack. Enclose 00 in quotes, since it is a string,
   but more importantly, use '==' instead of '=' for comparison. I hate it when
   I do that :)
  
   Kirk
  
   --
   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]
  
  --
  ___
  Jack Sasportas
  Innovative Internet Solutions
  Phone 305.665.2500
  Fax 305.665.2551
  www.innovativeinternet.com
  www.web56.net
  
  
  
  -- 
  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]
 

-- 
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] What would you want in a PHP web host?

2001-08-02 Thread Kurt Lieber

OK, this bugs me.  Jeff -- you're obviously getting a kickback for any
business you refer to them -- why not mention that in your email so we
all know you have some financial interest in the company?  

--kurt

 -Original Message-
 From: Jeff Pearson [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, August 02, 2001 9:00 AM
 To: Richard Baskett; [EMAIL PROTECTED]
 Subject: RE: [PHP] What would you want in a PHP web host?
 
 
 I am currently working with a hosting company that is 
 striving to attain everything you all have mentioned. Check 
 out http://www.eaccounts.net/ref/jp52950052/referer=emaillink
 
 I do the Beta testing for them and have all of my sites 
 hosted there. If there is something missing, let me know and 
 I'll bring it up to them.
 
 
 Jeff Pearson
 
 
  -Original Message-
  From: Richard Baskett [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, August 01, 2001 6:00 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] What would you want in a PHP web host?
 
 
  Please tell me what host you use!!  I cant even seem to get 
 the host I 
  am going through to upgrade php.  They'll do it when they 
 feel like is 
  pretty much the response I get.  Other host responses:  We don't 
  support php or mysql Sometime in the future, but currently no 
  support, You're the only person that has requested it, so 
 until more 
  demand, we're not going to support it  Frustrating, frustrating, 
  frustrating, especially when I feel like it's the wave of 
 the future.  
  A host that provides everything you've specified... is to die for :)
 
  So if you have a list... please do tell! :)
 
  Rick
 
   [this is long]
  
   on 8/1/01 1:06 AM, Derek Del Conte at 
 [EMAIL PROTECTED] wrote:
  
   I have been developing PHP for a while now, and I am wondering
  how other
   developers find their PHP hosting company.  So far this has not 
   been an issue for me because I am always in full control of my 
   servers
  (well, as
   much control as possible with any web server :), but recently
  we have begun
   to host other PHP sites.
  
   my background is networking. i've built and maintained a 
 number of 
   increasingly complex networks over the years and at times 
 have been 
   intimately involved in the customer support piece. i have had
  many jobs in
   the customer support area outside of technology too. now i
  write and host
   php apps.
  
   We want to make sure that we are providing appropriate support
  to our PHP
   developers.  I see too many hosting companies saying that they
  support PHP,
   but not having anyone familiar with PHP on hand.  We want to
  have actual
   support, a developer to call when you have a PHP issue.
  
   do you _really_ want to pay someone 24x7x365 to maintain a php
  help line?
   the best coding happens outside the 9-5 window.
  
   the way i see it, as a php hosting site, your job is to keep
  the servers up
   and running, 24x7x365, bug-free and up-to-date. php support is
  for software
   consultants (which isn't to say that you can't do both) folks who 
   need hosting want realiable hosting.
  
  
   What do you think a medium sized hosting company could do to
  give you (the
   developer) better service and support?
  
   honesty, reliability, communication, response, bandwidth.
  
   Is access to professional PHP developers useful when an issue 
   arises?
  
   i doubt it, but imagine you could come up with a business 
 model for 
   providing php development support. probably long term stuff.
  maybe write and
   maintain an application for someone, or possibly training...
  
   i would think of hosting and consulting as separate symbiotic
  businesses.
   you'll get some referral business and a little cross-over, but
  don't expect
   most hosting customers to want support or for folks 
 who've used you 
   to consult on a project to host their app with you.
  
   Are hosting companies reluctant to give you more access rights?
  
   if they say 'no', does their reason atleast seem reasonable? are 
   they willing to think about it and get back to you? do they say
  'yes' when they
   should be saying 'yes'?
  
   Are they willing to re-compile their PHP build to add other 
   options?
  
   as someone else has said, all options. php hosting should be
  php hosting.
  
   caveat--if there are some options that most folks would 
 reasonably 
   call 'optional' or 'dangerous', these shouldn't be expected. i am
  pretty new at
   programming and php, so i have no idea if things like 
 this exist. i 
   personally only compile in the options i use.
  
   How long do requested changes to the server take?
  
   unreasonable delays are unacceptable. i mean, if you can get it
  done, do it.
   these are our customers. they are giving us money :)
  
   you (or your server dude(ette)) should be as excited as your
  customer is for
   the new features. you should be saying whoa, i can't believe
  that's not in
   there. hold on... ... ... ok, try it now. it works? 

Re: [PHP] Spot the difference?

2001-08-02 Thread John Monfort


...ASP has gotta have something good about it cause microsoft uses it!


Hmm...you can get in sooo much trouble with that statement. Microsoft, in
any language, is not a synonym for 'quality'. Innovative? maybe. Quality?
no.

That statement should be your first reason why PHP is better. :-)



 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666





-- 
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] Adopt A Newbie (ME)

2001-08-02 Thread mike cullerton

dude, aren't you being a little harsh?

 I hereby nominate Kyle as the official George W. Bush of the PHP General
 mailing list.  Anyone second it?

to dubya, that is :)

-- mike cullerton


-- 
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] GetImageSize()

2001-08-02 Thread John Hurleston

I started to use this command in my soft about 3 months ago and all went
well, I've had to do some re-organising and I changed the varable that holds
the old image root, to the new image root and ofcouse moved the images, but
now my GetImageSize() doesn't work any more,

http://www.guia-marbella.com

shows two No's basicaly indicating that GetImageSize is not working

  Here is the code:

?
print (  td width=\175\ valign=\top\ align=\left\ \n);

  if ($Menu_Foto1 != )
{
  $Photo_Size = GetImageSize ($GS_Control_Gallery/$Menu_Foto1);
  $Photo_Size_W = $Photo_Size[0];
  $Photo_Size_H = $Photo_Size[1];


if ($Photo_Size_W  180)
  {
$Temp_Size1 = ($Photo_Size_W - 180 );
$Temp_Size2 = (180 / $Photo_Size_W);
$Photo_Size_W = ($Photo_Size_W - $Temp_Size1);
$Photo_Size_H = ($Photo_Size_H * $Temp_Size2);
  }

  print (  img border=\0\
src=\$GS_Control_Gallery/$Menu_Foto1\ width=\$Photo_Size_W\
height=\$Photo_Size_H\ \n);
  print (  brbr \n);

}

  if ($Menu_Text1 != )
{
  print (font size=\$GS_Text_Font_Size\
face=\$GS_Text_Font\ color=\$GS_Text_Colour\\n);

if ($Menu_Title1 != )
  {
print (b$Menu_Title1/bbr \n);
  }
  print ($Menu_Text1br \n);
  print (/font\n);
  print (br \n);
}

  if ($Menu_More1 != )
{
  print (  iba href=\$Menu_More1\font
size=\$GS_Text_Font_Size\ face=\$GS_Text_Font\
color=\$Menu_Link_Colour\More.../b/font/a/i \n);
}

print (  /td \n);
?

Just by the piont that you can see the images there means that the image
location is correct.
So, I dont know...

Can anyone shine any light...


John Hurleston





-- 
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] .shtml or .php ?

2001-08-02 Thread David Ovens

The Virtual() command works on my hosting server, I am running windows, idigostart 
perl/apache with php4 installed, how do I get this virtual() command to work on my 
machine, I assumed that the php4 I had installed was an apache module.

I have .shtml pages using includes for html, and exec cgi for executing .cgi 
scripts, as I am using php more and more is there an advantage in me changing my 
.shtml pages to php and use the equivalent include, and virtual commands ??  But I do 
need somehow to be able to use the virtual() command on my machine so that I can 
develop my scripts.

Dave




Re: [PHP] Phone Number #s Only?

2001-08-02 Thread mike cullerton

on 8/2/01 5:32 PM, Jeff Oien at [EMAIL PROTECTED] wrote:

 Is there a routine out there to strip all characters from a phone
 number except the numbers? I was going to write my own but
 figured there must already be one out there I can use. Thanks.
 Jeff Oien

ereg_replace ([^0-9],,$string);

 -- mike cullerton



-- 
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] question about PHP manual and ImageCopyMerge() function

2001-08-02 Thread Kurt Lieber

For the ImageCopyMerge() function in the PHP manual
(http://php.net/manual/en/function.imagecopymerge.php) it states at the
top that (PHP 4 = 4.0.1) is required in order to use it.  However,
farther down the page, it says Note: This function was added in PHP
4.0.6

Am I mis-reading something?  Can anyone tell me which is the correct
version of PHP in which this function was added?

Thanks.

--kurt


-- 
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] possible switch() bug in 4.0.6 ?

2001-08-02 Thread Chris Lee

4.0.6 apxs
warning = E_ALL;

?
 switch($search)
 {
  case 'date':
   echo 'date';
   break;
  case 'people':
   echo 'people';
   break;
  case 'keyword':
   echo 'keyword';
   break;
  default:
   echo 'default';
   break;
 }
?

Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 4
Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 7
Warning:  Undefined variable:  search in
/home/httpd/vhosts/mediawaveonline/test2.php on line 10

if you ask me, I should get a warning on line 2 where the switch is, not on
4, 7, 10 where the case statements are.

php 4.0.5 cgi does not do this.

--

  Chris Lee
  [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]




Re: [PHP] another REGEX question

2001-08-02 Thread James, Yz

Hi Julian,

personally, I'd take out both tags, using something like:

$str = preg_replace(/\/?p.*?/i, , $str);

Which gets rid of:
p
p align=whatever
/p

Or any case insensitive matches.  That's probably just me though ;)

James.

Julian Simpson [EMAIL PROTECTED] wrote in message
news:20010802214051.BGVV22490.femail29.sdc1.sfba.home.com@cr37888-a...
 $str = eregi_replace('p[^]*', ' ', $str); worked!

 thanx guys

 Julian

 At 5:19 PM -0400 8/2/01, Jack Dempsey wrote:
 Try
 $str = preg_replace(p.*?,  ,$str);
 
 jack
 
 
 Or
  $str = eregi_replace('p[^]*', ' ', $str);
 
 This matches p (or P), followed by any character string that
 DOESN'T include a , then the trailing .
 
 Preg functions are faster, though. And, if you're interested in
 little speed tweaks, use single quotes - ' - rather than double
 quotes -  - here. With double quotes, PHP searches the quoted string
 for variables or escape characters to replace.
 
  -steve
 
 
 -Original Message-
 From: Julian Simpson [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 5:16 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] another REGEX question
 
 I have a string can look like either of the following:
 psome stuff/p
 p align = leftsome stuff/p
 
 I want to use eregi_replace to take out the first p tag whether it be
 p or p align.. with a space
 
 I assumed that $str = eregi_replace (p.*,  ,$str);
 but it matches the entire string and thus turns the whole string into
 one space.
 aparently regex will match the biggest possible match rather than the
 smallest
 my question is how do i get it to match the smallest.
 
 thanx in advance..
 
 Julian
 
 
 
 --
 +-- Factoid: Of the 100 largest economies in the world, 51
are --+
 | Steve Edberg   University of California, Davis
|
 | [EMAIL PROTECTED]   Computer Consultant
|
 | http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/
|
 +--- corporations --
http://www.ips-dc.org/reports/top200text.htm ---+
 






-- 
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] Adopt A Newbie (ME)

2001-08-02 Thread Kyle Smith

Ok, im trying to cut down on the posts here but this time im really stuck, so could 
somebody guide me through the usage of mySQL and PHP and show me how to input data 
into a mySQL database and read it, or just redirect me to another page (which is what 
normally happens)

NOTE: i am using phpMyAdmin


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] Re: Netscape Enterprise Server

2001-08-02 Thread Herman Tolentino


- Original Message -
From: R. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 11:07 AM
Subject: [PHP] Re: Netscape Enterprise Server


 On which system?

 You can fined for Win9x an Nt/2000 a lot of usefull info there:
 http://benoit.noss.free.fr/php/install-php.html

 If like me you use 2000 you will save a lot of trouble by changing the way
 you are making the file association for php files. You need to have the
 shell-open-command directly under the .php key in the registry.

 Hope it's help

 R.

 Herman Tolentino [EMAIL PROTECTED] wrote in message
 000e01c11bcb$2ae75800$[EMAIL PROTECTED]">news:000e01c11bcb$2ae75800$[EMAIL PROTECTED]...
 Dear folks,

 Any body there with experience setting up Netscape Enterprise Web Server
 with PHP as CGI binary. I need to know how to configure Netscape Web
Server.

 TIA,

 Herman Tolentino





 --
 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]




[PHP] Database classe to work with Oracle

2001-08-02 Thread pierre-yves

Hello,
I need to convert an application that run on mysql to an oracle database. The 
application strickly use the db_mysql class
from phplib. Can anyone suggest me another class and maybe common pitfalls to avoid ?

Thank you,

py



Re: [PHP] Syntax

2001-08-02 Thread Tim

You need to do:

if (isset(...)) {
...
}
else if (isset(...)) {
...
}
else if (isset(...)) {
...
}
...



On 02 Aug 2001 17:10:26 +0200, BRACK wrote:
 Hi,
 
 I'm in a process of doing site with MySQL database, and most of 
 the code I plased in index.php3 (in one file) but I've got some 
 problems with statements:
 
 I have:
 if (isset(...)) {
 ...
 }
 elseif (isset(...)) {
 ...
 }
 elseif (isset(...)) {
 ...
 }
 else {
 ...
 }
 
 IT DOESNT WORK!
 
 but when I do:
 
 if (isset(...)):
 ...
 elseif (isset(...)):
 ...
 elseif (isset(...)):
 ...
 else:
 ...
 endif;
 
 It works, please tell me what a difference? what do I do wrong that 
 firs variant doesn't work?
 
 Yury
 
 -- 
 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]




[PHP] Apache

2001-08-02 Thread [EMAIL PROTECTED]

This is just a little bit off-topic - sorry

I'm running Mandrake 8.0 and am pretty new to Linux. I want to download my 
entire website to my hard drive and put it in hte /var/www folder, but apache 
is the owner and the group for that directory. I'm just wondering, if I chown 
the directory so that I am the owner, would that cause problems somehow? Or 
is it possible to chmod it so that apache is still the owner but i am allowed 
to write to it?  

TIA

Tom Malone

-- 
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] Spot the difference?

2001-08-02 Thread Ezra Nugroho

Thanks for the info, I am a PHP developer who will have to maintain some 
outsourced (darned) ASP codes.

For all ASP converts who are currently converting, look at 
http://asp2php.naken.cc/

At 04:18 PM 8/2/2001 -0400, [EMAIL PROTECTED] wrote:
Hokay, my 2p...

I'm a (former) ASP programmer who just made the leap from ASP to PHP about 2
weeks ago.  A week ago I got my entire web-portal recoded to use PHP, a move
that experience tells me can't be done as quickly and easily with ASP.  All
religious arguments aside, one must admit that (1) PHP is well documented
and VBScript isn't (period); (2) PHP has many more USEFUL functions built-in
that are already debugged and working; (3) the examples one finds on
php.net, phpbuilder.net, or any other knowledge base actually WORK and are
usually pretty clear; (4) there is absolutely no question that PHP's notion
of security is truly secure, 100% in diametric opposition to IIS/ASP.  I've
tested that to destruction and am confident enough in it to release PHP as
an alternative language for my web-hosting customers.

I cannot repose the same confidence in ASP--even less confidence when Front
Page extensions are wrapped around it.  Note that I have never released ASP
as an alternative language for my customers and given its documentation and
security shortcomings, it's not likely to happen.

Mind, I've used ASP for several years and am (unfortunately) intimately
familiar with its shortcomings.  Many of the string-manipulation functions
inherent in PHP must be provided by third parties (like Vantage Point
PowerStrings http://www.vpsoft.com) in order to do some tricky URL or
input-cleaning routines.  I challenge anyone to use M$'s mail objects with
the same degree of security and reliability. Try and find real docs on
VBScript -- there aren't any with any substance.  M$'s site is useless as
are the examples they give (which, by the way, NEVER work as demonstrated).
M$ should be taking notes from php.net on how to present and maintain
documentation.

Now, if a paying customer insists that I do work for them using ASP, of
course that's what I'll use.  But I strongly advise against it now, given
the points above.  With only a couple of weeks of PHP under my belt, I'm
still confident enough in the language itself and the documentation around
it that I will be able to do any web job that comes along.  I might have to
have the manual at my side a bit longer, but as time goes on I find I refer
to it less and less.  All in all, a very natural succession of events.

Guess that was more than two cents...keep the change :-)

Bill

-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Spot the difference?




I much prefer PHP, obviously... But posting to a PHP list isn't going to
get you a very objective answer.  I find PHP more versatile and easy to
use, but an ASP programmer may tell you the same thing about ASP.

Also-- try looking stuff up for yourself sometimes... I realize you're
new to PHP, but at last count, you've sent 46 e-mails to this list in
the past 10 days...  99% of your questions could be answered by going to
the PHP manual, www.phpbuilder.net, or any of the FAQs that have been
posted to this list in the past few days.


-Original Message-
From: Kyle Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 8:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Spot the difference?


Well which is easier to program?


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666


- Original Message -
From: scott [gts] [EMAIL PROTECTED]
To: php [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 8:45 AM
Subject: RE: [PHP] Spot the difference?


  ASP is basically like PHP, only it uses a VB-based
  language instead of perl/c-based one.
 
  which means it sucks - vb is evil.
 
   -Original Message-
   From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
   Subject: Re: [PHP] Spot the difference?
  
   isnt this fact a good enough reason to believe it worthless???
  
 
 
  --
  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]


--
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]


Ezra Nugroho
Web/Database Application Specialist
Goshen College ITS
Phone: (219) 535-7706


Don't be humble, you're not that great. -- Golda Meir


-- 
PHP General Mailing List (http://www.php.net/)
To 

RE: [PHP] Q: Hiding Folder Directories from public while still...

2001-08-02 Thread scott [gts]

if you're using apache, there's a *much* easier/secure way
of doing this.

setup an .htaccess file to restrict access to certain
username/passwords.

check out both:
man htaccess
man htpasswd


 -Original Message-
 From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 1:34 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Q: Hiding Folder Directories from public while
 still...
 
 
 i dont know if this is elagant but ti works.  but a fake index.htmlin your
 directory for browsers to default to.   . ..
 
 
 - Original Message -
 From: Marcus James Christian [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 03, 2001 12:30 AM
 Subject: [PHP] Q: Hiding Folder Directories from public while still...
 
 
  Hello,
 
  How does one do the trick of hiding a  folder's directory listing from a
  public browser?
 
  i.e.  Lets say the full address is  www.mysite.com/php/magicphppage.php
 
  Well I still need some other files to read and write to
  magicphppage.php   I don't want the public to be able to simply type
  www.mysite.com/php/ and have all of my php files show up on a funky
  virtual directory.
 
  Thanks,
  Marcus
 
  --
  Marcus James Christian - UNLIMITED -
  Multimedia Internet Design
  http://mjchristianunlimited.com
 
  Proudly presents the music of CHROMATICUS
  at http://chromaticus.com
  and http://artists.mp3s.com/artists/275/chromaticus.html
 
 
 
  --
  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]
 

-- 
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] Q: Hiding Folder Directories from public while still...

2001-08-02 Thread Marcus James Christian

Hello,

How does one do the trick of hiding a  folder's directory listing from a
public browser?

i.e.  Lets say the full address is  www.mysite.com/php/magicphppage.php

Well I still need some other files to read and write to
magicphppage.php   I don't want the public to be able to simply type
www.mysite.com/php/ and have all of my php files show up on a funky
virtual directory.

Thanks,
Marcus

--
Marcus James Christian - UNLIMITED -
Multimedia Internet Design
http://mjchristianunlimited.com

Proudly presents the music of CHROMATICUS
at http://chromaticus.com
and http://artists.mp3s.com/artists/275/chromaticus.html



-- 
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] Phone Number #s Only?

2001-08-02 Thread Martin Cameron

Just as the solution to spray paint the m/b green made me smile, this did 
too. 

This will strip out all characters except numerals at the beginning, right!

martin Cameron

On Fri, 03 Aug 2001 11:52, you wrote:
 on 8/2/01 5:32 PM, Jeff Oien at [EMAIL PROTECTED] wrote:
  Is there a routine out there to strip all characters from a phone
  number except the numbers? I was going to write my own but
  figured there must already be one out there I can use. Thanks.
  Jeff Oien

 ereg_replace ([^0-9],,$string);

  -- mike cullerton

-- 
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] another REGEX question

2001-08-02 Thread Jack Dempsey

Glad to hear...steve's post was a good one...something else to think
about: sometimes people go for the .*? method, and sometimes the [^]*
way...they give the same results in most cases, but the .*? will match
the least amount it can, using the dot...the negation will match
anything...so, unless you have the s flag enabled, the . will not match
a newline, while the negation will...
Just a lil extra info

jack

-Original Message-
From: Julian Simpson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 02, 2001 5:42 PM
To: Steve Edberg; [EMAIL PROTECTED]
Subject: RE: [PHP] another REGEX question

$str = eregi_replace('p[^]*', ' ', $str); worked!

thanx guys

Julian

At 5:19 PM -0400 8/2/01, Jack Dempsey wrote:
Try
$str = preg_replace(p.*?,  ,$str);

jack


Or
   $str = eregi_replace('p[^]*', ' ', $str);

This matches p (or P), followed by any character string that 
DOESN'T include a , then the trailing .

Preg functions are faster, though. And, if you're interested in 
little speed tweaks, use single quotes - ' - rather than double 
quotes -  - here. With double quotes, PHP searches the quoted string 
for variables or escape characters to replace.

   -steve


-Original Message-
From: Julian Simpson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 5:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] another REGEX question

I have a string can look like either of the following:
psome stuff/p
p align = leftsome stuff/p

I want to use eregi_replace to take out the first p tag whether it be
p or p align.. with a space

I assumed that $str = eregi_replace (p.*,  ,$str);
but it matches the entire string and thus turns the whole string into
one space.
aparently regex will match the biggest possible match rather than the
smallest
my question is how do i get it to match the smallest.

thanx in advance..

Julian



-- 
+-- Factoid: Of the 100 largest economies in the world, 51 are
--+
| Steve Edberg   University of California,
Davis |
| [EMAIL PROTECTED]   Computer
Consultant |
| http://aesric.ucdavis.edu/
http://pgfsun.ucdavis.edu/ |
+--- corporations -- http://www.ips-dc.org/reports/top200text.htm
---+





-- 
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]




[PHP] ODBC

2001-08-02 Thread jtjohnston

Can someone show me how to display the contents of a table in a MS
Access file using ODBC on my Windows machine?

Thanks,
John


-- 
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] HTML file with variable replacement.

2001-08-02 Thread Jason Bell

Ok, I'm trying to seperate my php from my html  the method I've been
trying to use is like so:

$html = fread(fopen(htmlpage.html, r), filesize(htmlpage.html));
print $html;


This works perfectly fine, except if I want to use a variable

lets say that my htmlpage.html includes the following:

CENTERH2Hello! Your variable has a value of: $myvar/H2/CENTER

and my test.php file is as follows:

?php
$myvar = It works!;
$html = fread(fopen(htmlpage.html, r), filesize(htmlpage.html));
print $html;
?

I would expect the output to be:

Hello! Your variable has a value of: It works!

but what I get is:

Hello! Your variable has a value of: $myvar


any hints/tips/suggestions?  Is there another way that I should be doing
this?

thanks!

Jason




-- 
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] software localization with PHP

2001-08-02 Thread Colin Viebrock

I was just looking through the mailing list archives for some help
with my gettext problem (basically, I can't get it to work).

Anyway, I came across your post:

 Thanks for the reply.  This will not solve my problem.  The problem is,
for some
 languages the sentence structure may be different.  For example, the
sentence
 may need to be,
 $greeting = $first_name, welcome!
 as opposed to,
$greeting = Welcome, $first_name!

This can be handled by gettext.  Change your english code to something like:

$greeting = sprintf( gettext(Welcome, %s!), $first_name );

Once you run xgettext to extract all the strings, you'll end up with

msgid Welcome, %s!
msgstr 

So just convert it into whatever language, and move the %s as needed, eg:

msgstr %s, bonjour!

This even works with multiple %s's, in later versions of PHP where you can
rearrange the arguments in the format string, but not the way they are
passed
to sprintf():

msgid %s is %d years old
msgstr $2%d Jahrs habe $1%s

Check www.php.net/sprintf for details.

Hope that helps.

- Colin


-- 
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] Adopt A Newbie (ME)

2001-08-02 Thread Marty Landman

At 01:36 PM 8/2/01 -0700, Kyle Smith wrote:

could somebody guide me through the usage of mySQL and PHP and show me how 
to input data into a mySQL database and read it

Kyle,

I wrote a script which does all that and it's open source. You can see the 
script in action if you go to the Stupid Web Tricks section of Cat 'n Moose at

http://catnmoose.com/stupid.shtml

Download the source code from devshed at

devshed.com/ClipScripts/results/453

hth,

Marty

Face 2 Interface Web Solutions
Website Creation Made SIMPL(tm)
http://face2interface.com/Demo


-- 
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] (//// === huh??)

2001-08-02 Thread Gerard Samuel

In my script that puts out a form I have a drop down list which include ==
echo option$Education/option\n;
echo optionBachelor's Degree/option\n;

It uses a $PHP_SELF target.  After the form is submitted, on the new
page, in the textbox I have Bachelor\\\'s Degree getting outputed by
$Education and the more I submit the form the more \ I get.

Any ideas as to how to clean this up?
Thanks



-- 
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] Re: Strange behaviour while adding a line at the BOF

2001-08-02 Thread Er Galvão Abbott

On Wed, 1 Aug 2001 15:13:10 -0500, [EMAIL PROTECTED] (Richard Lynch)
wrote:

 I'm going nuts trying to add a line of data in the beginning of a text
 file.

Files are like cassette tapes.

You can't add something at the beginning without re-copying everything
somewhere else first, and then back again.

You should either:
1. Add to the end, and just make your reader/display program work backwords.
This only works for small files.

2. Use a database instead.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



Hey Richard, thanks a lot. NOW I understood. :)

Best regards,



   Er Galvão Abbott
 Webdeveloper
  [EMAIL PROTECTED]
-
To send me an e-mail just remove
the CAPITAL TEXT.
-

-- 
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] html parsing question

2001-08-02 Thread mike cullerton

on 8/2/01 5:30 PM, Chuck Barnett at [EMAIL PROTECTED] wrote:

 Hi I have a question about parsing a page on another server to grab some
 headlines.
 
 I want to search down the page until I find a string -headlines- then I
 want to grab everything between the next pair of table/table tags.
 
 Anyone have a quick solution?

i would check out http://php.net/strpos

 
 Thanks,
 Chuck
 
 


 -- mike cullerton



-- 
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] Adopt A Newbie (ME)

2001-08-02 Thread Michael J. Seely

HI
I don't know why you are like G.Bush.  But I have a vision that 
formed while scanning some of the lists recent postings.
I see a man shoveling snow, again, from the sidewalk. While this 
is going on a kid is running around building a snow man, making a 
fort, throwing snow balls, hollering at friends, in general, having 
fun.  Keep the fun going as long as you can.  If you get good enough, 
you can hire someone else to do the shoveling.

Good Luck...


WHY AM I GEORGE BUSH!?!?!?


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666


- Original Message -
From: B. van Ouwerkerk [EMAIL PROTECTED]
To: Tim [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 02, 2001 10:27 AM
Subject: Re: [PHP] Adopt A Newbie (ME)


  At 10:23 2-8-01 -0400, Tim wrote:
  I hereby nominate Kyle as the official George W. Bush of the PHP General
  mailing list.  Anyone second it?

  I do.

  Wanne setup a voting site for this ;)


  --
  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]

-- 

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Seely  408-777-9949




 

-- 
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] Oh and one more thing

2001-08-02 Thread scott [gts]

it's a little bit complicated, but here goes.

1) format your harddrive
2) take out your motherboard and spraypaint it
bright orange.
3) dance around the desk three times holding the
motherboard above your head chanting
mail mail, give me mail
date date, give me date
ga booga woooga shooga
4) install linux 
5) install apache
6) install PHP


 -Original Message-
 From: Kyle Smith [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 8:45 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Oh and one more thing
 
 
 How do i set up extra functions on my computer like mail() and date()
 
 
 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!
 
 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666
 
 
 

-- 
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] another REGEX question

2001-08-02 Thread Julian Simpson

hahah that had two interesting effects the first was that it left the and the 
second
was that it turned off all the highlighting in my editor due to the ? 

any idea how to include the braces in the match and perhaps not using the ? string 
for the sake of convenience :)

Julian

8/2/01 5:19:03 PM, Jack Dempsey [EMAIL PROTECTED] wrote:

Try
$str = preg_replace(p.*?,  ,$str);

jack

-Original Message-
From: Julian Simpson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 02, 2001 5:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] another REGEX question

I have a string can look like either of the following:
psome stuff/p 
p align = leftsome stuff/p

I want to use eregi_replace to take out the first p tag whether it be
p or p align.. with a space

I assumed that $str = eregi_replace (p.*,  ,$str);
but it matches the entire string and thus turns the whole string into
one space.
aparently regex will match the biggest possible match rather than the
smallest
my question is how do i get it to match the smallest.

thanx in advance..

Julian


-- 
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]




Re: [PHP] Re: FAQ

2001-08-02 Thread Brian White

If I am talking to other geeky types I explain the full history of 
Personal Home
Page outgrowing it's name to become PHP: Hypertext Processor , recursive 
like
GNU ete. etc.

If I am talking to non geeky types, and they bother to ask, I go with 
Professional
Hypertext Processor.

Brian


At 22:54 1/08/2001 -0700, Rasmus Lerdorf wrote:
   PHP Hypertext Preprocessor.
 
  Which does not explain the php

Sure it does - look in the titlebar of your browser when you go to
http://php.net

-Rasmus


--
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]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML  HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [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]