Re: [PHP] multiple outputs to mysql_query()

2001-07-08 Thread [EMAIL PROTECTED]

on 7/8/01 5:53 AM, Adam at [EMAIL PROTECTED] wrote:

 thanks so much for the help, that'll be a great reference for any other
 similar types of output i need.
 
 some things i had to fix for others viewing this thread:
 
 while ($numrows) had to be changed to while ($numrows = 1) or the while
 statement would loop forever. (server hangup)
 
 i had to accomidate and if statement to check if the amount of $numrows left
 was = 1
 
 -Adam



Have you tried this?

 ?php

 echo 'table';

 $result = mysql_query(SELECT * from table WHERE type='default');


 while (mysql_fetch_row ($result)) {

 
 echo tr\ntd$row[0]/td\n;
 $row = mysql_fetch_row ($result);
 echo td$row[0]/td\n/tr;

 }

 echo '/table';

 ?


It might be a more simple way of doing it ... but I haven't tried 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]




Re: [PHP] I thought I beat the safe mode ... now this ...

2001-07-08 Thread [EMAIL PROTECTED]

Can anyone see anything wrong with this code?


$chmodresult = chmod ($imageloc, 0777);
$trashpath = trash/$filenamec;
$trashed = rename ($trashpath, $imageloc);
echo moving $imageloc to $trashpath, $trashed, $chmodresultbr;

I'm trying to move the file at $imageloc to a folder called 'trash' (in the
same folder as $imageloc. The pasths are OK. Could this be a safe mode
problem?


$chmodresult returns 1 or true, but the file is still protected when I go
look at it...

Susan


-- 
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] Printable Report Generator

2001-07-08 Thread [EMAIL PROTECTED]

on 7/8/01 10:04 AM, Keyser Soze at [EMAIL PROTECTED] wrote:

 I need to create a report to send it to printer based on datas from my
 database.firstly I tried pdf, but it's too hard to manage and it generate
 big sized archives.
 Any suggestions


What kind of report?

a report of what?

Susan


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

2001-07-08 Thread [EMAIL PROTECTED]

http://www.futurebird.com/mapbuild3

I fixed it so now people who don't have css, or IE 5 (or a mac for that
matter) can use it... thanks for all the feedback.


Susan


-- 
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] okay I've fixed it

2001-07-08 Thread [EMAIL PROTECTED]

http://www.futurebird.com/mapbuild3

Had many errors. But now it has many fewer, any feedback you guys can send
me will mean a lot. Please try to upload stuff, I need to know that is
working on other computers...

Susan


-- 
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] easy mysql question

2001-07-08 Thread [EMAIL PROTECTED]

Since I first made the tables for my site I've had to modify them quite a
bit. I always keep a copy of the commands I used to make the tables in case
I need to move a site. Is there a way to ask mysql to list the create table
commands?


Susan


-- 
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] Real Estate Catalog

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 2:43 AM, Joe  Smith at [EMAIL PROTECTED] wrote:

 If you'd rather I bore everyone with the details, let me know and I'll post
 my questions to this thread for all to see and chime in on.


If your questions are clear, and if you don't post too much code people here
seem to be very nice. It helps if the question is general enough that other
people can use the answer too.

I'm new at all this too when I get stuck, I try google or one of these sites
for help before posting ...

http://www.php.net
tells how to use most functions

http://www.webmonkey.com
Great tutorials, but only for easy stuff

http://www.mysql.com
a bit confusing, but in theory all the functions are here...

http://www.phpbuilder.com
lots of posts, often I find that someone else has had the same question as
me, also some great tutorials.

http://www.devshed.com
lots of great scripts to steal


Good Books:

O'Riley PHP pocket reference
MySQL by Paul DuBois and Michael Widenius
O'Riley MySQL and mSQL

Hope that helps!




-- 
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 map?

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 3:36 PM, Chris Lambert - WhiteCrown Networks at
[EMAIL PROTECTED] wrote:

 You'd pretty much have to do that pixel by pixel. What exactly do you want
 the final application to do...often times there are alternative solutions
 derived at by others knowing what you wish to accomplish.


Well I was hoping there'd be something that was a bunch of vectors. If you
got to my site you'll se what I'm up to It's basically a


 http://www.futurebird.com/mapbuild3
*** very rough


I'm making a site that will allow users to upload a map and add 'events' to
it. The events can include photographs and comments, possibly even sound
clips and such.

You can choose to share your map and to link it to similar maps. You can
make user groups and share all of your events. You can view events from any
area as a time line. Or look at events from any time period as a map. You
can chain events and make a map that shows how the event chain moved through
space (or didn't.)

It's postmodern because ianyone/i can contribute and because events
can countian conflicting accounts and information. (Just like real history!)
I'm going to using it for my online diary because I want to see where I was
when I was thinking or seeing something (personal obssesion... sorry) But it
has lots of other uses...

So I wanted to see if there was a vector map I could use as the main map
that all the other maps will be linked to.


Susan






-- 
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] Question: Processing files in directory and parsing...

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 9:02 PM, Jeff Lewis at [EMAIL PROTECTED] wrote:

 I have a directory with 163 files.  I'd like to go through and process all
 files with the word rost in them.


Are these files named in any logical way? ie. 01.htm
02.htm etc.

Do you have a list of the files someplace?  I'm not certain how to get a
list of the files in a directory, but I know it's possible in perl, so out
of curiosity I'll see what's there.

The rest seems pretty easy using


$fp = fopen (/wwbl/HTML/watrost.htm, rw);

$rost = strstr ($fp, 'rost');

if ($rost) { echo There it is!; }


Susan





-- 
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] Question: Processing files in directory and parsing...

2001-07-07 Thread [EMAIL PROTECTED]

ahh here is what you need:



$d = dir(/etc);

while($entry=$d-read()) {
echo $entry.br\n;
//put what you want to do to each thing in the dir here...



}
$d-close();


-- 
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] I thought I beat the safe mode ... now this ...

2001-07-07 Thread [EMAIL PROTECTED]

Okay I've been trying to do file uploads on a server that is in safe mode
(not my choice) I was able to get around the safe mode by doing:


$path = images/$filetitle$user$filesuff;
if (is_uploaded_file ($form_data)) { move_uploaded_file
(addslashes($form_data), $path); }

And it worked, so now people can upload files ... but I also want them to be
able to delete files so I tried:

unlink($path);

Nope, can't do that in safe mode...

Okay maybe I can just move the files into a trash folder, then empty it
myself every week or so:

$chmoderror = chmod ($imageloc, 0777);
$filename = strstr ($imageloc, '/');
$trashpath = trash$filenamec;

No I get an error:

Unable to access trash/200107072306491.gif in
/usr/local/plesk/apache/hosts/futurebird.com/httpdocs/mapbuild3/deletemap.ph
p3 on line 97


Is this safe mode? or am I doing the file move all wrong?

Susan


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

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 11:27 PM, Chris Lambert - WhiteCrown Networks at
[EMAIL PROTECTED] wrote:

 I am afraid I am completely stupid in the way that watermarks
 work(researching now).  however I need to know quickly if I can dynamically
 apply a watermark to an image using PHP.  Any one know?


Just use 
 imagestring (int im, int font, int x, int y, string s, int col)

that is if you have the GD lib installed.

Susan


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

2001-07-06 Thread [EMAIL PROTECTED]

Okay there is a file called global.inc

?php

// display a list from the DB

function list_of_maps () {

db_connect ();
$sql = SELECT mapname,rowid FROM maps;
$result = mysql_query($sql);

while ($row = mysql_fetch_row ($result)) {
return a href='viewonly.php3?mapid=$row[1]'$row[0]/abr;  }

}



?

But when I call it like this:

?php

include('global.inc');
echo list_of_maps ();

?

It only shows the first result from the db... How do I get it to list them
all?


Susan


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

2001-07-06 Thread [EMAIL PROTECTED]

on 7/6/01 11:36 AM, rick at [EMAIL PROTECTED] wrote:

 while ($row = mysql_fetch_row ($result)) {
 $map_list .= a href='viewonly.php3?mapid=$row[1]'$row[0]/abr;  }
 }
 return $map_list;


Thanks Rick! This worked great.

I guess I'm right in assuming that all you can get back from a function is
one big string return. I've tried passing varibles to function and gave up
on it.


global.inc

?php

function takes_a_string ($string) {

$temp = $string;
return $string;


}


?




mainfile.php3

?php

$var = something.;

echo takes_a_string ($var);







?


-- 
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] upload data (from a form) and functions.

2001-07-06 Thread [EMAIL PROTECTED]

There are a bunch places in my site where I  take data from a from like:


form method=post action=somefile.php3 enctype=multipart/form-data
input type=file name=form_data size=40
input type=Submit name=submit value=submit form
/form


Can I make a function in global.inc that will do the

move_uploaded_file ($form_data, $path);

function? How do I pass $form_data to such a function?

I've tried calling

copy_my_file ($form_data);

but bad things happed... also can use $form_data_size and the like in an
outside function?

Susan


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
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] My new toy!

2001-07-06 Thread [EMAIL PROTECTED]

Okay I need some people to jump in and try to use my site to see if it is
working OK. I know I have a lot of work to do on it but I just want some
feed back and to get a little more direction before I light into the code
again.

If You have some free time please play around with:

http://www.futurebird.com/mapbuild3


Thanks so much for the help!

Susan


-- 
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 fun! JOIN me ...

2001-07-05 Thread [EMAIL PROTECTED]

Question 1: is there a good explination online of how to use the JOIN
function in mysql? I've looked at the documentation:

http://www.mysql.com/doc/J/O/JOIN.html

but it's to confusing. It doesn't exactly what you are joining or why you
might want to do that ... I think JOIN is what I need, here is the problem:




So I have some tables:


create table maps
(
rowid INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL
);

create table locations
(
map INT(10),  #map rowid
rowid INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL
);

create table notes
(
location INT(10), ## location rowid
rowid INT(10) AUTO_INCREMENT PRIMARY KEY NOT NULL
);



Each map has many locations and each location has many notes ...

I want to delete the map, all of it's locations and all of the locations
notes.

clearing the maps and locations is easy:

$sql = DELETE FROM maps WHERE (rowid='$mapid');
$result = mysql_query($sql);

$sql = DELETE FROM locations WHERE (map='$mapid');
$result = mysql_query($sql);


but how to get rid of those notes?


I'm thinking of sending all of the location rowid(s) to an array then using
that array to delete the notes ... but I think this JOIN thing might let me
do it all with one query.

Can any of you kind folks help me here?


-- 
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] writing a query that returns similar numbers

2001-07-04 Thread [EMAIL PROTECTED]

I have a database with numbers in one of the tables I'd like to ask mysql to
renturn all numbers with say 10 of mynumber

Sort of like this:

$sql = SELECT rowid FROM numbers WHERE (mynumer is within 10 of number);


but I've gotten stuck do I have to do this:


$sql = SELECT rowid FROM numbers WHERE (((mynumer+10)  number) AND
(mynumer-10)  number) );

it seems kinda wordy ...

Susan


-- 
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 it me or my server company?

2001-07-04 Thread [EMAIL PROTECTED]

Okay I'm trying to use fopen() to open a file just uploaded via a form. like
this:

echo brparsing uploaded file . . .;
 
$path = fopen($form_data, r);

echo bropeing a path . . .;
$thesize = filesize($form_data);

echo brgetting size . . .;
$tmpdata = fread($path, $thesize);

echo brreading data . . .;
$data = addslashes($tmpdata);


but I get this error:

parsing uploaded file . . .
Warning: SAFE MODE Restriction in effect. The script whose uid is 10294 is
not allowed to access /tmp/phpxyqF2z owned by uid 0 in
/usr/local/plesk/apache/vhosts/futurebird.com/httpdocs/mapbuild2/displaymap.
php3 on line 34

Is there some kind of safe mode that keeps fopen() from looking at the
tempoary directory where the uploaded file is stored?

The other error:

Warning: fopen(/tmp/phpxyqF2z,r) - Success in
/usr/local/plesk/apache/vhosts/futurebird.com/httpdocs/mapbuild2/displaymap.
php3 on line 34

When it says Success what is it talking about?

Is there a way around this? Maybe since I'm on a vitual server I need to
include a more full path?

I'm deeply confused.

Susan


-- 
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] image button troubles

2001-07-03 Thread [EMAIL PROTECTED]

QUESTION 1

I'm working on a form that reads where the user clicks on an image using:

?php echo x = $mapclick_x and y = $mapclick_y; ?

where the map has name=mapclick

I get this as output:

Location is x = 94 and y =Ê36

What is that strange e thing?



QUESTION 2

I want to check how large the image is, so I tried this:

$test = GetImageSize ($maploc);

echo $test[3];


(it's a jpg, and $maploc is any URL)

But I get this error:



Warning: Unable to open http://www.php.net/gifs/php_logo.gif in
/usr/local/plesk/apache/vhosts/futurebird.com/httpdocs/mapbuild/addloc.php3



I'm running php version 4.0.3pl1


I've also been unable to get any other image funtions to work (various
errors) I'll keep trying things but any help would be greatly appriciated.



Thanks,
Susan

http://futurebird.diaryland.com



--
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] image button troubles (duh)

2001-07-03 Thread [EMAIL PROTECTED]

I've found the bug in this question. Still no luck with QUESTION 1 sorry to
bug you guys


Susan

-



QUESTION 2

I want to check how large the image is, so I tried this:

$test = GetImageSize ($maploc);

echo $test[3];


(it's a jpg, and $maploc is any URL)

But I get this error:



Warning: Unable to open http://www.php.net/gifs/php_logo.gif in
/usr/local/plesk/apache/vhosts/futurebird.com/httpdocs/mapbuild/addloc.php3



I'm running php version 4.0.3pl1


I've also been unable to get any other image funtions to work (various
errors) I'll keep trying things but any help would be greatly appriciated.


-- 
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] image button troubles

2001-07-03 Thread [EMAIL PROTECTED]

on 7/3/01 7:52 PM, Kurt Lieber at [EMAIL PROTECTED] wrote:

 I had a similar problem a while back that I solved by isolating my
 variables.  Such as:
 
 ?php echo x =  . $mapclick_x . and y =  . $mapclick_y . ; ?
 
 As for why it's happening, I'm not sure.


Wow, that fixed it!  Though it turns out I was mistaken in thinking I'd
fixed the bug... it still says it's unable to open the image I give it...

hmmm..

Susan


-- 
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 w/ URL conflicting messages ...

2001-07-03 Thread [EMAIL PROTECTED]

http://www.php.net/manual/en/function.getimagesize.php

Here it seems to say that you can use getimagesize with a URL

But here 

http://www.phpbuilder.com/mail/php-developer-list/282/2426.php


it says you can't 

Any comments? is it just in newer versions?

Susan



-- 
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: time

2001-06-22 Thread [EMAIL PROTECTED]

Dear Jason
got problem that make me not able to email direct to the list, they keep
bounce me back. Anyway, apologise in advance that I have to email you
directly, I used PHP_AUTH_USER for login method, no cookies or session used,
how could I do the logout that will completely get rid of the log in details
without having user to close the browser?
Jack
[EMAIL PROTECTED]
Love your enemies, it will drive them nuts
- Original Message -
From: Jason Murray [EMAIL PROTECTED]
To: 'Jon Yaggie' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 20, 2001 11:52 PM
Subject: RE: [PHP] re: time


  actually i believe if you date() it gives you users system time
 
  it is the problem i have run into in the script i am trying to
  modify. the original person used date() and it clear shows my time.
  As much as i admit the possibility of their server being in Siberia
  but I doubt it.

 PHP would have no idea what the time is on the user's system.

 Date() returns the current system time in the format you specify.

 Of course, if the time on their system is stuffed, it could look
 like they're in Siberia...

 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]




-- 
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] ***Get a piece of the #1 CASH MACHINE on the net***

2001-06-20 Thread [EMAIL PROTECTED]


SEX SELLS!!!
 
Enjoy the riches of the most lucrative business in the world without being in the 
business.
 
If you are in need of money quickly, This is for you.  You don't have to access the 
website if you do not wish, just take the money it will generate for you.
 
Believe me it will be a short time until you will receive hundreds, then thousands 
each month.  Would you like to be earning $10,000 a month within 6 months. It costs 
nothing to check it out but it could change your life forever, as it did mine.
 
For full details e-mail me:   
mailto:[EMAIL PROTECTED]
 
For further details reply with 'MORE DETAILS'
in the subject line. If you want to be
removed from my email database please reply
with 'REMOVE' in the subject line






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

2001-06-19 Thread [EMAIL PROTECTED]

test
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you've set for
yourself




Re: [PHP] select the most repeated value in a field

2001-05-24 Thread [EMAIL PROTECTED]

After I use that query, I got list of result group by DESC under variable
name  firstchoice, how could I index this firstchoice variable so that I
can take each individual result to display according to the page layout
position?
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you've set for
yourself
- Original Message -
From: George E. Papadakis [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 24, 2001 2:56 AM
Subject: Re: [PHP] select the most repeated value in a field


 select result,count(*) as cnt from table group by result order by cnt desc
;


 - Original Message -
 From: Jacky [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, May 24, 2001 10:02 PM
 Subject: [PHP] select the most repeated value in a field


 Hi people
 How do i query to select the most repeated values in a field, say if I
hacve
 list of values as a,b,c,d,e to be submitted to a field call result in a
 table. And I want to know which value appear most in that result field
 amoung all records.
 cheers
 Jack
 [EMAIL PROTECTED]
 There is nothing more rewarding than reaching the goal you've set for
 yourself






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

2001-05-20 Thread [EMAIL PROTECTED]

Can someone give me a template of an email form?

I don't want it to use an email client, though.

I don't get the mail function, and I've been out of the loop too long. 
:(

-Owen

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

2001-05-19 Thread [EMAIL PROTECTED]

I've been out of the loop for so long.

I make a normal form, but the action is something.. 

I don't want it to send from the uers email, but use the server.  Some
people don't have an email client configured.  Can yah help?  

Thanks,
Owen

-- 
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] $B:G6a$I$&!)(B

2001-05-13 Thread [EMAIL PROTECTED]
$B!z!z(B Chyoi Machi Mail $B!z!z(B
$B>pJsDs6!4k6HL>(B : NET-DOCONO

$B"!!~"!!~"!!~"!!~(B
http://sv.g-spot.to/docono/
$B$M$'$M$'J9$$$F$h(B
$B$*$7$c$l$G$+$C$3?M$,$$$C$Q$$(B
$B$i$7$$!#$h$+$C$?$i!"GA$$$F$_$F!*(B
$B$-$C$H!"=P2q$$$,$"$k$h!#(B
http://sv.g-spot.to/docono/
$B"!!~"!!~"!!~"!!~(B

Chyoi machi Mail $B$K4X$9$k$40U8+$J$I(B
[EMAIL PROTECTED] $B$^$G(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] Couldn't run PHP script from CGI-BIN

2001-05-04 Thread [EMAIL PROTECTED]

CGI-BIN is for CGI.  :)

Martín Marqués wrote:

 On Sáb 05 May 2001 00:50, you wrote:
  I can run PHP script from any directories on my web server but except
  cgi-bin directory.  When I put PHP script inot CGI-BIN and run it from my
  browser, I receive below error.  Does anyone know why?  Please help.
 
  Internal Server Error
  The server encountered an internal error or misconfiguration and was unable
  to complete your request.

 I think you have mistakes related with concepts.
 I maybe wrong, so I'll ask: What are you putting in the cgi-bin directory?
 How is your webserver configured (especially the cgi-bin directory)?

 Put I guess you're putting the php scripts in the cgi-bin dir and trying to
 see them from your browser. Am I wrong?

 Saludos... :-)

 --
 El mejor sistema operativo es aquel que te da de comer.
 Cuida tu dieta.
 -
 Martin Marques  |[EMAIL PROTECTED]
 Programador, Administrador  |   Centro de Telematica
Universidad Nacional
 del Litoral
 -

 --
 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] Need to know this

2001-05-03 Thread [EMAIL PROTECTED]

Parsed Hypertext Processing, AFAIK.

YoBro wrote:

 Hello,

 I need to find out what PHP stands for.

 Also what is better,
 ASP or PHP and who has the biggest market share.

 Any help would be really great.

 Thanks,

 Chris

 --
 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: [PHP-WIN] trouble with cookies

2001-05-02 Thread [EMAIL PROTECTED]

I've always had problems with the php-sessions too.
I think it's far easier and more effective and flexible, if you use
a mySQL database to do your own session handling.
This is actually very easy to do.


 -Original Message-
 From: r.gelstharp [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 3. Mai 2001 00:05
 To: [EMAIL PROTECTED]
 Subject: [PHP-WIN] trouble with cookies


 I'm having trouble getting cookies to work. I'm using PHP4, and yes I have
 already read the manual and I've done like it says to place the
 setcookies()
 function BEFORE any other calls such as HTML and so forth.

 Have I missed a configuration I should have done in setting up
 PHP/Apache/whatever? I don't believe I have but you never know...



 --
 PHP Windows 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] $BL4$N@$3&$X!&!&!&(B

2001-05-01 Thread [EMAIL PROTECTED]
$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B
$B>pJsDs6!4k6HL>(B : G-Spot.com

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B
   $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B
http://sv.g-spot.to/check/mail.html
   $B(B $B<qL#$G=8$a$?L5NA2hA|#3#0#0#0#0(Bpic

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B

Just in Mail $B$K4X$9$k$40U8+!"$*Ld$$9g$o$;$O(B
[EMAIL PROTECTED] $B$^$G$I$&$>!#(B

$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(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] a bit off the list but....

2001-05-01 Thread [EMAIL PROTECTED]

So what is SAP really?
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you set for
yourself
- Original Message -
From: Pierre-Yves Lemaire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2001 5:17 PM
Subject: RE: [PHP] a bit off the list but


 There is these two SAP vendors talking to each other. The first one says:
 I finnally convinced company xyz to buy our products. The second one
says:
 It took them a long time to see the light!!. The first one replies:
 Ya, now here comes the darkness...

 ha ha ha
 py


 At 11:04 PM 5/1/01 -0400, you wrote:
 don't know if its what you're talking about, but try www.sap.com
 also, search google...
 
 -jack
 
 -Original Message-
 From: Jacky [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 02, 2001 10:28 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] a bit off the list but
 
 
 It is a bit off the list here but is theer anybody know what is SAP? I
mean,
 is that a script language or OS or a DB software?
 cheers
 Jack
 [EMAIL PROTECTED]
 There is nothing more rewarding than reaching the goal you set for
 yourself
 
 
 --
 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]


 + ==
 + Pierre-Yves Lem@ire
 + E-MedHosting.com
 + (514) 729-8100
 + [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] Tough comparison problem.

2001-04-26 Thread [EMAIL PROTECTED]

I've got two functions that return data in an array. I need to compare the
individual elements of one array against the elements of another, and do
something within an if-else statement.

I'm using php3, so I don't have an actual foreach loop to pick out the
array elements. Instead, I use:

while(list(, $element)=each($array)){

Basically, here's what I need to do:

Pull element 1 out of array 1,
Compare it to all elements of array 2,
Do something (if-else) based on the results of that comparison,
Pull element 2 out of array 1,
Compare it to all elements of array 2,

and so on until all elements of array 1 have been compared to all elements
of array 2.

Any help is greatly appreciated!


-- 
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 get var value

2001-04-26 Thread [EMAIL PROTECTED]

why don't you assign in next page like this?
$newvar = $test;
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you set for
yourself
- Original Message -
From: AJDIN BRANDIC [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 26, 2001 5:53 AM
Subject: [PHP] how to get var value


 Hi,

 (this is just an example)
 I have on one page

 $test=1;
 $var1='test';

 on another page I want to be able to construct variable from the value in
 $var1 (test in this case)  and print its value.   So,

 $newvar=$;
 $newvar.=echo$var1;

 now $newvar contains string '$test' but not the value of $test (1 in this
 case).

 There has to be way aroud this but I am just cannot find it :(.

 Regards

 Ajdin

 --
 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] 'XML To Array' Class

2001-04-23 Thread [EMAIL PROTECTED]

Hello,

I'm new to using XML with PHP, but I think I've got it figured out for 
the most part.  I have created a class that reads in an XML file and 
returns the data it finds to an array, but I'm running into a problem 
because the array keeps coming back empty.  Would you mind taking a 
moment to see where I'm going wrong?


file.xml
===

ARTICLE
URL/article1.html/URL
TITLEArticle 1/TITLE
/ARTICLE

ATRICLE
URL/article2.html/URL
TITLEArticle 2/TITLE
/ATRICLE



xml.class.php
===


? 


class eXML
{


var $Parser;

var $theArray;
var $theArrayTopElement;
var $theArrayElements;
var $theArrayPointer;
var $theArrayGetElement;


function eXML($_PARENT_, $_CHILDREN_)
{

$this-Parser = xml_parser_create(ISO-8859-1);
xml_set_object($this-Parser, $this);
xml_set_element_handler($this-
Parser, Tag_Open, Tag_Close);
xml_set_character_data_handler($this-
Parser, CData);

$this-theArray = array();
$this-theArrayPointer = 0;
$this-theArrayGetElement = NULL;
$this-theArrayTopElement = $_PARENT_;
$this-theArrayElements = $_CHILDREN_;

}


function Free()
{

xml_parser_free($this-Parser);

}


function Parse_Array($_FILE_)
{

$_FP_ = fopen($_FILE_, r) or die(Cannot Open 
XML Stream);

while ($_DATA_ = fread($_FP_, 4096))
{

if (!xml_parse($this-Parser, $_DATA_, 
feof($_FP_)))
{

return(FALSE);

}

}

fclose($_FP_);
var_dump($this-theArray);
return($this-theArray);

}


function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{

if ($_TAG_ == $this-theArrayTopElement)
{

$this-theArray[$this-theArrayPointer] 
= SOMETEXT;
//  NOT SURE IF THIS IS NECESSARY

}

$_ELEMENTS_ = explode(::, $this-
theArrayElements);
for ($I = 0; $I  count($_ELEMENTS_); $I++)
{

if ($_TAG_ == $_ELEMENTS_[$I])
{

$this-theArrayGetElement = 
$_ELEMENTS_[$I];

}

}


}


function Tag_Close($_PARSER_, $_TAG_)
{

if ($_TAG_ == $this-theArrayTopElement)
{

$this-theArrayPointer++;

}

$this-theArrayGetElement = NULL;

}


function CData($_PARSER_, $_CDATA_)
{

if ($this-theArrayGetElement != NULL)
{

array_push($this-theArray, $_CDATA_);
$this-theArray[$this-theArrayPointer]
[$this-theArrayGetElement] = $_CDATA_;

}

}

}


?



xml.test.php
===

? 


$XML = new eXML(ARTICLE, URL::TITLE);
$ARTICLES = $XML-Parse_Array(file.xml);
print_r($ARTICLES);


?


What I expect to happen is this:

$ARTICLES[0][URL] == /article1.html;
$ARTICLES[0][TITLE] == Article 1;
$ARTICLES[1][URL] == /article2.html;
$ARTICLES[1][TITLE] == Article 2;

But the array is empty.

Thankz in advance for your help.
Robert



-- 

[ Swift eNetwork ] Matrix
http://matrix.swifte.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]




Re: [PHP] 'XML To Array' Class (Array Problem)

2001-04-23 Thread [EMAIL PROTECTED]

I think it's important to mention that my problem is not with XML, but 
with my use of arrays.  I have tested the variable content that comes 
back with XML and the data is coming through.  My problem is I am not 
doing something right to make the data into an array...



 heey,
 
 i'm currently facing the same problem as you.
 i was thinking of using either xml_parse_into_struct or using 
 a class i found phpxml.class at http://www.phpxml.org
 let me know how you did it, i'm very intrested
 
 Serge Zeddicus Zu'l Zorandre Vleugels
 
 -- freedom is the wizard's only choice --
 
 
 On 23 Apr 2001 09:18:25 -0400, [EMAIL PROTECTED] wrote:
  Hello,
  
  I'm new to using XML with PHP, but I think I've got it figured out 
for 
  the most part.  I have created a class that reads in an XML file 
and 
  returns the data it finds to an array, but I'm running into a 
problem 
  because the array keeps coming back empty.  Would you mind taking a 
  moment to see where I'm going wrong?
  
  
  file.xml
  
===
  
  ARTICLE
  URL/article1.html/URL
  TITLEArticle 1/TITLE
  /ARTICLE
  
  ATRICLE
  URL/article2.html/URL
  TITLEArticle 2/TITLE
  /ATRICLE
  
  
  
  xml.class.php
  
===
  
  
  ? 
  
  
class eXML
{
  
  
var $Parser;
  
var $theArray;
var $theArrayTopElement;
var $theArrayElements;
var $theArrayPointer;
var $theArrayGetElement;
  
  
function eXML($_PARENT_, $_CHILDREN_)
{
  
$this-Parser = xml_parser_create(ISO-8859-
1);
xml_set_object($this-Parser, $this);
xml_set_element_handler($this-
  Parser, Tag_Open, Tag_Close);
xml_set_character_data_handler($this-
  Parser, CData);
  
$this-theArray = array();
$this-theArrayPointer = 0;
$this-theArrayGetElement = NULL;
$this-theArrayTopElement = $_PARENT_;
$this-theArrayElements = $_CHILDREN_;
  
}
  
  
function Free()
{
  
xml_parser_free($this-Parser);
  
}
  
  
function Parse_Array($_FILE_)
{
  
$_FP_ = fopen($_FILE_, r) or die(Cannot 
Open 
  XML Stream);
  
while ($_DATA_ = fread($_FP_, 4096))
{
  
if (!xml_parse($this-Parser, 
$_DATA_, 
  feof($_FP_)))
{
  
return(FALSE);
  
}
  
}
  
fclose($_FP_);
var_dump($this-theArray);
return($this-theArray);
  
}
  
  
function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{
  
if ($_TAG_ == $this-theArrayTopElement)
{
  
$this-theArray[$this-
theArrayPointer] 
  = SOMETEXT;
  //  NOT SURE IF THIS IS NECESSARY
  
}
  
$_ELEMENTS_ = explode(::, $this-
  theArrayElements);
for ($I = 0; $I  count($_ELEMENTS_); $I++)
{
  
if ($_TAG_ == $_ELEMENTS_[$I])
{
  
$this-theArrayGetElement = 
  $_ELEMENTS_[$I];
  
}
  
}
  
  
}
  
  
function Tag_Close($_PARSER_, $_TAG_)
{
  
if ($_TAG_ == $this-theArrayTopElement)
{
  
$this-theArrayPointer++;
  
}
  
$this-theArrayGetElement = NULL;
  
}
  
  
function CData($_PARSER_, $_CDATA_)
{
  
if ($this-theArrayGetElement != NULL)
{
  
array_push($this-theArray, $_CDATA_);
$this-theArray[$this-
theArrayPointer]
  [$this-theArrayGetElement] = $_CDATA_;
  
}
  
}
  
}
  
  
  ?
  
  
  
  xml.test.php
  
===
  
  ? 
  
  
$XML = new eXML(ARTICLE, URL::TITLE);
$ARTICLES = $XML-Parse_Array(file.xml);
print_r($ARTICLES);
  
  
  ?
  
  
  What I expect to happen is this:
  
  $ARTICLES[0][URL] == /article1.html;
  $ARTICLES[0][TITLE] == Article 1

[PHP] XML/Array Class

2001-04-23 Thread [EMAIL PROTECTED]

I've narrowed down my problem...  It is building the array as it 
should.  I can print_r the results in the function CData().  However, 
the results are no longer then at the end of GetArray().  I'm not sure 
what's causing this problem...



? 


class eXML
{


var $Parser;

var $theArray;
var $theArrayTopElement;
var $theArrayElements;
var $theArrayPointer;
var $theArrayGetElement;


function eXML($_PARENT_, $_CHILDREN_)
{

$this-Parser = xml_parser_create(ISO-8859-1);
xml_set_object($this-Parser, $this);
xml_set_element_handler($this-
Parser, Tag_Open, Tag_Close);
xml_set_character_data_handler($this-
Parser, CData);

$this-theArray = array();
$this-theArrayPointer = 0;
$this-theArrayGetElement = NULL;
$this-theArrayTopElement = $_PARENT_;
$this-theArrayElements = $_CHILDREN_;

}


function Free()
{

xml_parser_free($this-Parser);

}


function GetArray($_FILE_)
{

$_FP_ = fopen($_FILE_, r) or die(Cannot Open 
XML Stream);

while ($_DATA_ = fread($_FP_, 4096))
{

if (!xml_parse($this-Parser, $_DATA_, 
feof($_FP_)))
{

return(FALSE);

}

}

fclose($_FP_);

//print_r($this-theArray);~~ shows empty 
array
return($this-theArray);

}


function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{

$_ELEMENTS_ = explode(::, $this-
theArrayElements);
for ($I = 0; $I  count($_ELEMENTS_); $I++)
{

if ($_TAG_ == $_ELEMENTS_[$I])
{

$this-theArrayGetElement = 
$_ELEMENTS_[$I];

}

}

}


function Tag_Close($_PARSER_, $_TAG_)
{

if ($_TAG_ == $this-theArrayTopElement)
{

$this-theArrayPointer++;

}

$this-theArrayGetElement = NULL;

}


function CData($_PARSER_, $_CDATA_)
{

if ($this-theArrayGetElement != NULL)
{

$this-theArray[$this-theArrayPointer]
[$this-theArrayGetElement] = $_CDATA_;
//print_r($this-theArray);   --- 
shows the multi-dimentional array

}

}

}


?


-- 

[ Swift eNetwork ] Matrix
http://matrix.swifte.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] XML/Array Class (Possible Bug??)

2001-04-23 Thread [EMAIL PROTECTED]

I decided to take my class and just turn it into some functions.  It 
works perfectly.  I did not change any code except for removing the 
class declaration and getting rid of the $this- statements.  I believe 
that maybe my problem has to do with the use of xml_set_object() making 
a reference to $this:

xml_set_object($this-Parser, $this);

If this is the case, I'm not sure why it would show the correct results 
in CData() but not at the end of GetArray(), but that's the only thing 
I can think the problem may be.

Below is a copy of my code just as seperate functions.  The code works 
perfectly.  I *really* wish I could find out why this won't work as a 
class though...



?


function GetArray($_FILE_)
{

global $Parser, $theArrayTopElement, $theArrayElements, 
$theArrayPointer, $theArrayGetElement, $theArray;

$theArray = array();

$_FP_ = fopen($_FILE_, r) or die(Cannot Open XML 
Stream);

while ($_DATA_ = fread($_FP_, 4096))
{

if (!xml_parse($Parser, $_DATA_, feof($_FP_)))
{

return(FALSE);

}

}

fclose($_FP_);

return($theArray);

}


function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{

global $Parser, $theArrayTopElement, $theArrayElements, 
$theArrayPointer, $theArrayGetElement, $theArray;

$_ELEMENTS_ = explode(::, $theArrayElements);
for ($I = 0; $I  count($_ELEMENTS_); $I++)
{

if ($_TAG_ == $_ELEMENTS_[$I])
{

$theArrayGetElement = $_ELEMENTS_[$I];

}

}

}


function Tag_Close($_PARSER_, $_TAG_)
{

global $Parser, $theArrayTopElement, $theArrayElements, 
$theArrayPointer, $theArrayGetElement, $theArray;

if ($_TAG_ == $theArrayTopElement)
{

$theArrayPointer++;

}

$theArrayGetElement = NULL;

}


function CData($_PARSER_, $_CDATA_)
{

global $Parser, $theArrayTopElement, $theArrayElements, 
$theArrayPointer, $theArrayGetElement, $theArray;

if ($theArrayGetElement != NULL)
{

$theArray[$theArrayPointer]
[$theArrayGetElement] = $_CDATA_;

}

}


$theArrayTopElement = ARTICLE;
$theArrayElements = URL::TITLE;
$theArrayPointer = 0;
$theArrayGetElement = NULL;

$Parser = xml_parser_create(ISO-8859-1);
xml_set_element_handler($Parser, Tag_Open, Tag_Close);
xml_set_character_data_handler($Parser, CData);

$NEWS = GetArray(myfile.xml);
print_r($NEWS);



?

-- 
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] calculate length between date to date

2001-04-22 Thread [EMAIL PROTECTED]

Hi all
I have 2 variables here that store date start and date end, I want to compare the 
lenght between the start date and the end date, how would I do that?
$dateStart = $year . $mon . $date ; ( for instance, it will return 20010102)
$dateEnd = $yearEnd . $monEnd . $dateEnd ; ( for instance, it will return 
20010201)

How do I calculate the length between those 2 variables?
Jack
[EMAIL PROTECTED]
There is nothing more rewarding than reaching the goal you set for yourself



Re: [PHP] Variable variable

2001-04-18 Thread [EMAIL PROTECTED]

the variable $id in the second sniplet come from the id from talble when I
run query and loop it using mysql_fetch_array. So I end up have value of $id
from the id field from table, right?But the value store in $id is now in
string value, and if I need to use that value for the if..then.. else
condition to check if which checkbox is checked, I will need to use Variable
variable to make the string back to be variable again , like $$id, for
instance after I run the query and get all Id value from table, it will be
like
$id = 1, $id=2, and so on
and as I used this for checkbox name at the previous page, in order to uset
it in the if..then..else condition in the second sniplet, it will be like
if ($1=="on") {
do something
}else{
do somehting
}
 but something is wrong here at the if then else bit. But I don't know what
is it.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Ulf Wendel [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 2:20 AM
Subject: Re: [PHP] Variable variable




 Jacky schrieb:
  !-- I got the value $id from a table and looping them and assign them
to the check box name--
  input type="checkbox" name ="$id" value="on"
 
  and when I submit the form to page foo.php4, at that page, I use
Variable variable to call the value of the check box to see if it checked
like this
 
  $quey = "select id from table";
  $result = .. ( assumeing it is done and i got value for $id for all
records from table)
 
  if ($$id =="on"){
  echo "on";
  }else{
  echo "off";
  }

 What's the value of $id in the second snippet? Generally speaking using
 $GLOBALS[$id] gives you more readable code but variable variables.

 Ulf

 --
 Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
 http://www.ulf-wendel.de/projekte/menu/tutorial.php |
 http://www.phpdoc.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]




[PHP] to find out which checkbox is checked

2001-04-18 Thread [EMAIL PROTECTED]

Hi all,
I still cannot get my problem sought out, pretty desparate here so decided
to post my question again.
Allow me to repeat my question again:
I have a form with the checkbox like this
form
?php
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
 {
print("input type="checkbox" name="$id" value="on"");
 }
submit button and stuffs here...
?
/form

After I submit to next page, at next page, how do I check which check box is
checked?
I did try isset() and empty() to check if variable exist ( as shown below)
and did not work as the result always turn up to be "off"

   if((empty($id))=='true'){
echo "off";
 }else{
   echo "on";
   }

And I also try
if(isset($id))
{
  ..do echo off here...
}else{
  ...do echo on
}

And the result is always "off" as well.

Somene advice me to use $http_var_gets btu I could not find it from manaual,
is that the solution I need?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -
From: Jacky [EMAIL PROTECTED]
To: Chris Fry [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 2:57 PM
Subject: Re: [PHP] Variable variable


 I did look up in the manual for $HTTP_GET_VARS but could not find it? what
 is it? a function?
 sorry to ask this again, just try to find out how to use that.
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Chris Fry [EMAIL PROTECTED]
 To: Jacky [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, April 18, 2001 2:59 AM
 Subject: Re: [PHP] Variable variable


  Sorry - thought you only had one! - it's late.
 
  To Name the checkboxes you need:
  ?php
  while (get records from db) {
  $id = id from record;
  ?
  input type="checkbox" name ="?php print $id; ?"
  ?php
  }
  ?
 
  You would have to do a $HTTP_GET_VARS on the next page to find out which
 ones
  exist.
 
  Then your select statement would be:
 
  $query = "select * from table where id IN ('comma delimited list of
 values')";
 
  Messy but do-able!
 
  Probably a better way - There usually is!
 
  Chris
 
  Jacky wrote:
 
   so how do I check at the next page which one is checked?
   Jack
   [EMAIL PROTECTED]
   "There is nothing more rewarding than reaching the goal you set for
   yourself"
   - Original Message -
   From: Chris Fry [EMAIL PROTECTED]
   To: Jacky [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Wednesday, April 18, 2001 2:31 AM
   Subject: Re: [PHP] Variable variable
  
Jacky,
   
You do not need the value. The variable $id will either exist (if
the
 user
   checked it) or not (if the user did not check it).
   
Hope this helps.
   
Chris
   
Jacky wrote:
   
 Hi all
 I have a form with check box and name of those checkboxes is
usuing
   variable lke this,

 !-- I got the value $id from a table and looping them and assign
 them
   to the check box name--
 input type="checkbox" name ="$id" value="on"

 and when I submit the form to page foo.php4, at that page, I use
   Variable variable to call the value of the check box to see if it
 checked
   like this

 $quey = "select id from table";
 $result = .. ( assumeing it is done and i got value for $id
for
 all
   records from table)

 if ($$id =="on"){
 echo "on";
 }else{
 echo "off";
 }

 It always returns echo "off", why is that?
 cheers
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set
for
   yourself"
   
--
Chris Fry
    Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia
   
Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au
   
You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt
   
   
**
   
This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy
all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are t

[PHP] Re: thank you very much

2001-04-18 Thread [EMAIL PROTECTED]

Chris
Apologise for sending you message directly, just one last thing about what I
have tried to to do, basically after I got list of string from
HTTP_POST_VAR, it will be like 12154, how do I make it to be 1,2,1,5,4 so
that I can put that in variable to put it in query?
I tried connect it like this "val" . ", " ;
and it returns 1,2,1,5,4, instead of 1,2,1,5,4 and it screw up query.
Thank again for this help, I am pretty sure this will be last question about
this :-)
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Chris Fry [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 5:59 PM
Subject: Re: thank you very much


 Jacky,

 Happy to help - I went through a lot of pain myself the first time I tried
to do
 something like this!

 Regards

 Chris

 "Jacky@lilst" wrote:

  Chris
  Nothing but thank you very much, I managed to got the value of the ID
list
  out according to your advice now.
  cheers
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
  ----- Original Message -
  From: Chris Fry [EMAIL PROTECTED]
  To: Jacky@lilst [EMAIL PROTECTED]
  Sent: Wednesday, April 18, 2001 4:52 AM
  Subject: Re: what about the include files in your example?
 
   Jacky,
  
   You don't need the include files - they are a style sheet and some
table
   definitions for my db.
  
   Just remove the includes and substitute your database stuff for mine.
  
   Regards
  
   Chris
  
  
   "Jacky@lilst" wrote:
  
What about those include file in your example? what do I have to do
with
them?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
    yourself"
- Original Message -
From: Chris Fry [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]
Sent: Wednesday, April 18, 2001 4:43 AM
Subject: Re: [PHP] Variable variable
   
 Sorry - fogot the url: it's getting late!

 http://sis.quillsoft.com.au/checkboxtest.php

 Chris

 Jacky wrote:

  Hi all
  I have a form with check box and name of those checkboxes is
usuing
variable lke this,
 
  !-- I got the value $id from a table and looping them and
assign
  them
to the check box name--
  input type="checkbox" name ="$id" value="on"
 
  and when I submit the form to page foo.php4, at that page, I use
Variable variable to call the value of the check box to see if it
  checked
like this
 
  $quey = "select id from table";
  $result = .. ( assumeing it is done and i got value for $id
for
  all
records from table)
 
  if ($$id =="on"){
  echo "on";
  }else{
  echo "off";
  }
 
  It always returns echo "off", why is that?
  cheers
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set
for
yourself"

 --
 Chris Fry
 Quillsoft Pty Ltd
 Specialists in Secure Internet Services and E-Commerce Solutions
 10 Gray Street
 Kogarah
 NSW  2217
 Australia

 Phone: +61 2 9553 1691
 Fax: +61 2 9553 1692
 Mobile: 0419 414 323
 eMail: [EMAIL PROTECTED]
 http://www.quillsoft.com.au

 You can download our Public CA Certificate from:-
 https://ca.secureanywhere.com/htdocs/cacert.crt


**

 This information contains confidential information intended only
for
 the use of the authorised recipient.  If you are not an authorised
 recipient of this e-mail, please contact Quillsoft Pty Ltd by
return
 e-mail.
 In this case, you should not read, print, re-transmit, store or
act
 in reliance on this e-mail or any attachments, and should destroy
all
 copies of them.
 This e-mail and any attachments may also contain copyright
material
 belonging to Quillsoft Pty Ltd.
 The views expressed in this e-mail or attachments are the views of
 the author and not the views of Quillsoft Pty Ltd.
 You should only deal with the material contained in this e-mail if
 you are authorised to do so.

 This notice should not be removed.



  
   --
   Chris Fry
   Quillsoft Pty Ltd
   Specialists in Secure Internet Services and E-Commerce Solutions
   10 Gray Street
   Kogarah
   NSW  2217
   Australia
  
   Phone: +61 2 9553 1691
   Fax: +61 2 9553 1692
   Mobile: 0419 414 323
   eMail: [EMAIL PROTECTED]
   http://www.quillsoft.com.au
  
   You can download our Public CA Certificate from:-
   https://ca.secureanywhere.com/htdocs/cacert.crt
  
   

Re: [PHP] HELP!! print problem

2001-04-17 Thread [EMAIL PROTECTED]

You're missing a single quote after the value of MAXLENGTH on the line 
that's not working...  Maybe that's the problem.

-- 

[ Swift eNetwork ] Matrix
 http://matrix.swifte.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] what does this error means?

2001-04-10 Thread [EMAIL PROTECTED]

When Itried to insert a record into a table, It looks like the record was
never inserted into table so I use mysql_error() and the error message show
up:
"Duplicate entry '10' for key 1"
What does that tell me?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"


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

2001-04-09 Thread [EMAIL PROTECTED]

Here I got this script:

$queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID' ORDER
BY start_date ASC";
$resultofrs  = mysql_query($queryoffers, $connection) or die(mysql_error());

  while($row = mysql_fetch_array($resultofrs))


 $IsAva = $row[6];
 }

and it keep saying "maximum execution time exceeded 30 secs", am I doing
something time consuming here? There are only 2 records in the table.
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -----
From: Zeus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Michael Hall [EMAIL PROTECTED];
Jacky [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 12:58 AM
Subject: Re: [PHP] while loop


 Isn't the '=' operator suppose to be used for assigning and not for
 evaluation.

 I thought '==' should be used in this context?

 Zeus
 - Original Message -----
 From: David Robley [EMAIL PROTECTED]
 To: Zeus [EMAIL PROTECTED]; Michael Hall [EMAIL PROTECTED];
Jacky
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, 10 April, 2001 1:53 PM
 Subject: Re: [PHP] while loop


  On Tue, 10 Apr 2001 15:16, Zeus wrote:
$query = mysql_query("some SQL here");
while ($row = mysql_fetch_array($query)) {
do stuff;
}
  
   Isn't this suppose to be an infinite loop?
  
   while ($row is assigned to mysql_fetch_array($query)) {
   do stuffs;
   }
  
   someone correct me if I'm wrong?
  
   Zeus
 
  Consider yourself corrected :-) mysql_fetch-array returns an array
  corresponding to the fetched row, or _false if there are no more rows_
 
  So as soon as there are no more rows, $row = mysql_fetch_array($query)
  evaluates to false and the while exits.
 
  --
  David Robley| WEBMASTER  Mail List Admin
  RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
  AusEinet| http://auseinet.flinders.edu.au/
  Flinders University, ADELAIDE, SOUTH AUSTRALIA


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

2001-04-09 Thread [EMAIL PROTECTED]

Not in the actual code, sorry, I did not copy the opnneing bit, but there is
one in the code.
So the same question, I got error said, maximum execution time exceed, am I
doing something time consuming here?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Brian Clark [EMAIL PROTECTED]
To: PHP is not a drug. [EMAIL PROTECTED]
Sent: Tuesday, April 10, 2001 1:05 AM
Subject: Re: [PHP] while loop



 Hi Jacky,

 @ 1:58:40 PM on 4/10/2001, Jacky@lilst wrote:

  Here I got this script:

  $queryoffers = "SELECT * FROM MiniOffers WHERE hotel_id = '$hotelID'
  ORDER BY start_date ASC";
  $resultofrs  = mysql_query($queryoffers, $connection) or
die(mysql_error());

while($row = mysql_fetch_array($resultofrs))

 Are you missing the opening curly brace in the actual code?

   $IsAva = $row[6];
   }
 ...


 -Brian
 --
  PGP is spoken here: 0xE4D0C7C8
  Please do not carbon copy me on list replies.



 --
 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] how do I delete session

2001-04-05 Thread [EMAIL PROTECTED]

how?
Like this
session_destroy("name");
how about if I want to register that variable to be session again ( without
closing browser and start everything all over again)? can I still do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Felix Kronlage [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]
Sent: Thursday, April 05, 2001 3:59 AM
Subject: Re: [PHP] how do I delete session


 On Thu, Apr 05, 2001 at 03:47:43PM -0500, Jacky wrote:

  session_unregister("name");
  ?
  It appears to me that the value is still there all the time,
  unles I close the browser. what did I do wrong??

 use session_destroy() to completly kill a session.

 -fkr
 --
 gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0
   |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
   |all your base are belong to us  |  shame on me  | fkr@IRCnet |




-- 
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 this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]

I also tried this syntax:
?php
global $test;
$test = "foo";
session_register("test");
?

and it still not work as when I go to next page, and try echo $test, nothing
come up.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -----
From: Joseph Bannon [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Monday, April 02, 2001 3:44 AM
Subject: RE: [PHP] is this syntax correct?


  So what is the right way to do?


 I resent my email to the list. I've done mostly DB work, so I need to know
 what those functions do.

 J




-- 
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 this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]

Not really, do I need to have session_start at the sender page and the
receiver page?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Wade Halsey [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Monday, April 02, 2001 3:48 AM
Subject: Re: [PHP] is this syntax correct?


 do you have
 session_start();
  at the top of the next page?

 - Original Message -
 From: Jacky@lilst [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, April 02, 2001 10:43 PM
 Subject: Re: [PHP] is this syntax correct?


  I also tried this syntax:
  ?php
  global $test;
  $test = "foo";
  session_register("test");
  ?
 
  and it still not work as when I go to next page, and try echo $test,
 nothing
  come up.
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
  - Original Message -
  From: Joseph Bannon [EMAIL PROTECTED]
  To: Jacky@lilst [EMAIL PROTECTED]
  Sent: Monday, April 02, 2001 3:44 AM
  Subject: RE: [PHP] is this syntax correct?
 
 
So what is the right way to do?
  
  
   I resent my email to the list. I've done mostly DB work, so I need to
 know
   what those functions do.
  
   J
  
  
 
 
  --
  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] $B%9%H%l%92r>C(B

2001-04-01 Thread [EMAIL PROTECTED]
$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B
$B>pJsDs6!4k6HL>(B Fun! Fun!! Fun!!!

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B
$B!!(B  $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B
$B!!(B http://sv.g-spot.to/check/mail.html
$B!!(B  $B<qL#$G=8$a$?L5NA2hA|#3#0#0#0#0Kg(B
$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B

Just in Mail $B$K4X$9$k$40U8+!"$*Ld$$9g$o$;$O(B
[EMAIL PROTECTED] $B$^$G$I$&$>!#(B

$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(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] split string value again

2001-03-29 Thread [EMAIL PROTECTED]

thank you everone, sorry about the rush though. I was kind of in urgent
need. Anyway, thanks again.:-)
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Stewart Taylor [EMAIL PROTECTED]
To: 'Jacky' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, March 29, 2001 3:51 AM
Subject: RE: [PHP] split string value again


 $addr = "mailto:[EMAIL PROTECTED];

 $splitaddr = explode("@",$addr);

 resulting in  $splitaddr[0] = "test";
   $splitaddr[1] = "foo.com";


 -Stewart

 -Original Message-
 From: Jacky [mailto:[EMAIL PROTECTED]]
 Sent: 29 March 2001 23:52
 To: [EMAIL PROTECTED]
 Subject: [PHP] split string value again


 Hi again
 have to try again after I have not recieved any advice, I have a vairable
 that stores email address value. I need to break it so that I will only
get
 the dmain name bit to store in another variable so that I can redirect
user
 to that domain, like if user email is [EMAIL PROTECTED] then I would like to
 break that and take only foo.com bit to use for navigation.
 How can I do that?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"

 --
 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] $B#J#u#s#t(B$B#i#n(B$B#M#a#i#l(B$B>pJs(B

2001-03-25 Thread [EMAIL PROTECTED]
$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(B
$B>pJsDs6!4k6HL>(B   $B%P%J!<%3%`(B

$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B
   $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B
  http://www.hh.iij4u.or.jp/~g-spot/check/mail.html
   $B<qL#$G=8$a$?L5NA2hA|#3#0#0#0#0Kg(B
$B!!(Bhttp://www.hh.iij4u.or.jp/~g-spot
$B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B

$B$"$J$?$N%a!<%k%"%I%l%9$O(B
 http://www.php.net/manual/admin-notes.php?last_entry=300  $B$N(B
$B%5%$%H$h$j<}=8CW$7$^$7$?!#(B

Just in Mail $B$K4X$9$k$40U8+!"$*Ld$$9g$o$;$O(B
$B(B $B!!([EMAIL PROTECTED]$B!!$^$G$I$&$>!#(B

$B!z!z!z!z!z!z!z!!(BJust in Mail  $B!z!z!z!z!z!z!z(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] String concatenation problems

2001-03-07 Thread [EMAIL PROTECTED]

I posted a related question yesterday with no response.  I've done some more 
investigating and think I can lay some of the blame on the string concatentation 
operation.  If anyone can tell me what might be causing this behavoir I would greatly 
appreciate it.

the following code shows the rough form of what I am doing
for ($i=0;$i100;$i++)
{
   $returnVal = "\tTR\n";
   $returnVal .= "\t\tTDFORMINPUT TYPE=\"HIDDEN\" NAME=\"name\" VALUE=\"$i\"\n";
   $returnVal .= "\t\t\tINPUT TYPE=\"SUBMIT\" VALUE=\"Do it\" /FORM /TD\n";
snip -- other similar cells being created
   $returnVal .= "\t/TR";
   $returnValArray[$i]=$returnVal;
}
return $returnValArray;

--- Problem description:
Some rows are corrupted.
The type of corruption that occur are
a) an incomplete row is in $returnVal before assignment to the array, the incomplete 
row is always stopped partway through the addition of a string, ie "ABC"."DEF"-"ABCD" 
sometimes
b) a doubled row.  The initial $returnVal assignment is skipped causing two iterations 
throuhg the for loop to build up on the returnVal variable.
c) unknown. in some cases, after the assignment of $returnVal to $returnValArray[$i] 
the array version will be corrupted while the originl is not.

What is happening here?  As mentioned this problem only materializes on an older 
machine (P133 with 64MB ram) not on the development machine (PIII700 with 128MB).  The 
productio server runs AOLServer while the development server runs Apache.

Eric Nielsen




Mail2Web - Check your email from the web at
http://www.mail2web.com/ .


--
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] test - can someone please reply?

2001-03-07 Thread [EMAIL PROTECTED]

okay I do reply here
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 1:29 AM
Subject: RE: [PHP] test - can someone please reply?


 ha ha ha .



 Maxim Maletsky



 -Original Message-
 From: David Robley [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 3:13 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] test - can someone please reply?


 On Thu,  8 Mar 2001 16:32, [EMAIL PROTECTED] wrote:
  this is a test for echo.
 this is a test for echo. .ohce rof tset a si siht
 --
 David Robley| WEBMASTER  Mail List Admin
 RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
 AusEinet| http://auseinet.flinders.edu.au/
 Flinders University, ADELAIDE, SOUTH AUSTRALIA

 --
 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] obtain IP from other site ( or domain name)

2001-03-06 Thread [EMAIL PROTECTED]

Hi people
I have exchange link business program with other sites, basically I give a hyper link 
to come to our store to them and when user click on the link on their site to come to 
us, they will genrate income from it too. 
The question is that how do I know that when a user click on the link to come to my 
site that a user come from the link from their site , or from their IP or something. 
So that I can tell where a user come from. 
Is this something to do with http header?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] dealing with no record

2001-03-04 Thread [EMAIL PROTECTED]

People
If I run a sniplet like this:

**
$query="select name from foo";
$result= mysql_query($query);
while($row = mysql_fetch_row($result))
 stuff...to display record found
...
***
what am I suppose to do if I also want the code to be able to deal with the case that 
no record found  and redirect user to other page?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] $B!a=5KvFCJL9f!a(B

2001-03-03 Thread [EMAIL PROTECTED]
--- $B!y!z(B $B#I#B#M%U%)!<%i%`#2#0#0#13+:E(B $B!z!y(B --- 2001.03.03 
-


$B=5Kv$r3Z$7$/2a$4$9$?$a$N%5%$%H$r$*CN$i$;CW$7$^$9!#(B

http://www9.xdsl.ne.jp/~jmp/index.html

--

$B>pJsDs6!4k6H$+$i$N$40MMj$K$h$j$3$N%a!<%k$rG[?.$7$F$*$j$^$9!#(B
$B<u?.%a!<%k$N%+%F%4%j!<JQ99!&%"%I%l%9JQ99!&:#8e$3$N%a!<%k$,ITMW$N>l9g(B
$B$3$N%a!<%k$r!VJV?.07$$!W$K$F%a%$%k%$%s08$^$G$*Aw$j$/$@$5$$!#(B
$B!J?75,:n@.$G$N%a!<%kAw?.$G$O:o=|$G$-$^$;$s!K(B


$B%a%$%k%$%s(B
[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 is wrong with this sniplet?

2001-02-28 Thread [EMAIL PROTECTED]

Sorry,
It was the mistyping. i actually put http:// in the a href. I just forgot to
type it in the mail. So what else could it be?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Alvin Tan [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 3:39 AM
Subject: RE: [PHP] what is wrong with this sniplet?


 Hi Jacky,

 The problem is a HTML one. Use "http://" followed by the address in your
a
 href tag.

 Regards,
 @lvin

 -Original Message-
 From: Jacky [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 01, 2001 5:40 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] what is wrong with this sniplet?


 people,
 I tried to write out email using sniplet below, the email will write out
the
 hyper link so that reciever can click on the link to go to the page. What
 happen is that the reciever recieve the actual link instead of the hyper
 link I made, so I wonder what did I do wrong. I have mad sure that the
email
 software I used to test can read html format ( I use outlook express).

   $mailTo  =   "[EMAIL PROTECTED]";
   $mailSubject = "test";
   $mailBody= "Dear sir, \n\n";
   $mailBody= "Below is the link you can click on, \n\n";
   $mailBody   .= "htmlbodyPlease Click a
 href=\"www.php.net\"Here/a/body/html to view the request details";
   $mailHeaders = "From: [EMAIL PROTECTED]\n";
   mail($mailTo, $mailSubject, $mailBody, $mailHeaders);

 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"


 --
 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 is wrong with this sniplet?

2001-02-28 Thread [EMAIL PROTECTED]

I am not sure but I think may be it is because whatever the mail() write out
in the body part will be recognised as text message, so even if we try to
make it to write out the HTML syntax, it won't work. It could be real stupid
to make such a notice but I can't think of anything else. Can you?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Alvin Tan [EMAIL PROTECTED]
To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 3:39 AM
Subject: RE: [PHP] what is wrong with this sniplet?


 Hi Jacky,

 The problem is a HTML one. Use "http://" followed by the address in your
a
 href tag.

 Regards,
 @lvin

 -Original Message-
 From: Jacky [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 01, 2001 5:40 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] what is wrong with this sniplet?


 people,
 I tried to write out email using sniplet below, the email will write out
the
 hyper link so that reciever can click on the link to go to the page. What
 happen is that the reciever recieve the actual link instead of the hyper
 link I made, so I wonder what did I do wrong. I have mad sure that the
email
 software I used to test can read html format ( I use outlook express).

   $mailTo  =   "[EMAIL PROTECTED]";
   $mailSubject = "test";
   $mailBody= "Dear sir, \n\n";
   $mailBody= "Below is the link you can click on, \n\n";
   $mailBody   .= "htmlbodyPlease Click a
 href=\"www.php.net\"Here/a/body/html to view the request details";
   $mailHeaders = "From: [EMAIL PROTECTED]\n";
   mail($mailTo, $mailSubject, $mailBody, $mailHeaders);

 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"


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

2001-02-27 Thread [EMAIL PROTECTED]

I have php site that user is required to login, but I don't have logout function yet. 
Is there anyone know the most practical way of logout method that people use 
nowadays?, in php I mean. There is no session or cookies used in this site.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Fw: [PHP] logout

2001-02-27 Thread [EMAIL PROTECTED]


Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Jacky@lilst [EMAIL PROTECTED]
To: Yamin Prabudy [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 3:49 PM
Subject: Re: [PHP] logout


 Sorry, it was my mistake. There is session used to store userID and
password
 after the successful login. I don't under stand what you mean about to
clean
 up variables, how?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Yamin Prabudy [EMAIL PROTECTED]
 To: Jacky@lilst [EMAIL PROTECTED]
 Sent: Tuesday, February 27, 2001 2:40 AM
 Subject: Re: [PHP] logout


  but still you had the variable hanging on the cookies while you are
 running
  the login function...
  just clean out all the variables and then you had a log out function
 (clean
  all the cookies) if you don't used cookies how do you transfer all the
 login
  variable ?
  - Original Message -
  From: Jacky@lilst [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, February 28, 2001 4:14 AM
  Subject: [PHP] logout
 
 
  I have php site that user is required to login, but I don't have logout
  function yet. Is there anyone know the most practical way of logout
method
  that people use nowadays?, in php I mean. There is no session or cookies
  used in this site.
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
 
 
 



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

2001-02-27 Thread [EMAIL PROTECTED]

Sorry, it was my mistake. There is session used to store userID and password
after the successful login. I don't under stand what you mean about to clean
up variables, how?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Yamin Prabudy [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 2:40 AM
Subject: Re: [PHP] logout


 but still you had the variable hanging on the cookies while you are
running
 the login function...
 just clean out all the variables and then you had a log out function
(clean
 all the cookies) if you don't used cookies how do you transfer all the
login
 variable ?
 - Original Message -
 From: Jacky@lilst [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 28, 2001 4:14 AM
 Subject: [PHP] logout


 I have php site that user is required to login, but I don't have logout
 function yet. Is there anyone know the most practical way of logout method
 that people use nowadays?, in php I mean. There is no session or cookies
 used in this site.
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"





-- 
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] can anyone please remove this subscriber:kia01@jnd.terra.com.br?

2001-02-27 Thread [EMAIL PROTECTED]

No offend but can anyone please remove this subscriber : [EMAIL PROTECTED] ? His 
mail box is full and I got the message to tell me that everytime I post the message to 
the list, this time included :-)
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] very off the topic questions here but hope someone can help out

2001-02-27 Thread [EMAIL PROTECTED]

This is very off the topic question, people. But I just wanna see if anyone has this 
experience and can tell me the procedure. I need to change the registrant company of 
several domains we own to the new company name. I only know that I need to do that at 
networksolution but don't have any idea about how and the process, any guide?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] installation problem

2001-02-26 Thread [EMAIL PROTECTED]

I'm a beginner but...I can't install php-4.o.4pl1 on my linux
mandrake..why?
When I run configure ,the program checks all the files...
there are some missing..but it never return an error
it return a warning 'you will need bison if you want to regenerate the
php parsers'
and after other check..it stops with this error'cannot find output for
lex;giving up'

what can i do?
thanks
Daniele


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

2001-02-22 Thread [EMAIL PROTECTED]

People
I tried to check if teh field has set a vaule in it before submit using isset with the 
sniplet below

if ((isset($AgeChild))=="false") {
$AgeChild = "NA";
}

The resule is that it always displays NA whether or not it has vaule in the field, 
what is the correct way of using isset for this purpose? Or should I use empty() ?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] isset()

2001-02-22 Thread [EMAIL PROTECTED]

[PHP] isset()yes, it is the var from the form
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"
  - Original Message - 
  From: Thiva Charanasri 
  To: 'Jacky@lilst' 
  Sent: Thursday, February 22, 2001 3:59 AM
  Subject: [PHP] isset()


  Is $AgeChild is the var that passed from a form? 

   Thiva  

  Thiva Charanasri 
  Web Administrator 
  Can-Thai Consulting Co., Ltd. 
  #50 Soi 13 Sukhumvit Road 
  Bangkok 10110 Thailand 
  Tel: 662-651-0064 
  Fax: 662-651-0065 
  24 Hour Service Line: 662-651-0063 
  http://www.canthai.com 
  Email: [EMAIL PROTECTED]  



  People 
  I tried to check if teh field has set a vaule in it before submit using isset with 
the sniplet below 

  if ((isset($AgeChild))=="false") { 
  $AgeChild = "NA"; 
  } 

  The resule is that it always displays NA whether or not it has vaule in the field, 
what is the correct way of using isset for this purpose? Or should I use empty() ?

  Jack 
  [EMAIL PROTECTED] 
  "There is nothing more rewarding than reaching the goal you set for yourself" 




[PHP] something wrong at my mail set up in php.ini

2001-02-19 Thread [EMAIL PROTECTED]

Dera folks,
I suspect there is something wrong at my php.ini mail setup. My script for mail() does 
not work and no error message, just did not send out anything. Is there anyway I can 
see if script mail() does not work and see what the problem is?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] mysql_last_id()

2001-02-19 Thread [EMAIL PROTECTED]

Why is this broken for BIGINTs?  Is there a good reason for it, or has no
one
simply fixed it...?

-Szii


-- 
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_last_id()

2001-02-19 Thread [EMAIL PROTECTED]

Sorry, that should be "mysql_insert_id()"

-Szii

- Original Message - 
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 19, 2001 2:06 PM
Subject: [PHP] mysql_last_id()


 Why is this broken for BIGINTs?  Is there a good reason for it, or has no
 one
 simply fixed it...?
 
 -Szii
 
 
 -- 
 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] mail() not working

2001-02-18 Thread [EMAIL PROTECTED]

I have syntax below, it suppose to send me email after there is someone buy our stuffs 
together with the email from my merchant. So far I only recieve email from my merchant 
but not from mail() function, anything wrong in my syntax? I did echo for the value of 
a variable $mailTo and it does has valid email address in there, can anybody tell me 
what went wrong?


$queryRequest  = "SELECT * FROM TouristRequests WHERE 
TouristRequestID='$TouristRequestID'";
$resultRequest = mysql_query($queryRequest) or die(mysql_error());


$mailAdmin = '[EMAIL PROTECTED]';  
// Mail to Activelifestyle Admin.
$mailTo  =   "$mailAdmin";
$mailSubject = "There has been a request from tourist for the 
resort:$ResortName for the Nodollar Form promotion";
$mailBody= "Dear Admininstrator, \n\n";
$mailBody   .= "The client $FirstName $LastName would like to request 
accommodation or service at this time.";
$mailBody   .= "Would you PLEASE copy the link below and send out the email to 
the hotels about this request. \n\n";
$mailBody   .= "Accomodation/service QuickForm : \n";
    $mailBody   .= "$linkToApp \n\n";
$mailHeaders = "From: [EMAIL PROTECTED]\n";

mail($mailTo, $mailSubject, $mailBody, $mailHeaders);

$mailTo   = "$Email";
$mailSubject = "Your Offer Request is in process";
$mailBody= "Dear $First_Name $Last_Name, \n\n";
$mailBody   .= "Your request for the offer is now in process.  Please allow 24 
hours to confirm your request via an email \n\n";
$mailBody   .= "Sincerely, \n\n";
$mailBody   .= "The Activelifestyle Travel Network .\n\n";

$mailHeaders = "From: [EMAIL PROTECTED]\n";

 mail ($mailTo, $mailSubject, $mailBody, $mailHeaders);


echo "bfont face ='verdana' size='2'$x_response_reason_text,nbsp;/font/bbr";
echo "bfont face ='verdana' size='2'$mailAdmin;/font/bbr";
echo "bfont face ='verdana' size='2'$Email;/font/bbr";
echo "bfont face ='verdana' size='2'Thank you for using our service. No monies 
will be taken at this stage as your credit card number is only be verified. You will 
now be redirected back to the home page. There will be email sent to your email 
account for your reciept. Please wait for a while.../font/bbr";
print("meta http-equiv='refresh' content='10;url=http://$hotelURL'");
***

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] Generate XML files

2001-02-15 Thread [EMAIL PROTECTED]

echo "SECTION\nBLAH VALUE=\"$fromform_value1\"\nFOOBAR
VALUE=\"$fromform_value2\"/SECTION";

Reformat as you want, I just didn't want to write multiple "echo" lines.  =P
Or..


xml
SECTION
BLAH VALUE="?php $val?"
FOOBAR VALUE="?php $val2?"
/SECTION
/xml

-Szii

- Original Message -
From: Paulo Jan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 15, 2001 4:05 AM
Subject: [PHP] Generate XML files


 Hi all:

 A question tangentially related to the former one. I have seen lots of
 tutorials about how to parse XML files using PHP and generate something
 else (usually HTML) from it, but I haven't seen anything so far about
 generating XML with some specific data.
 Basically, what I want is:

 1) To have a XML file describing the structure of the data, like:

 SECTION
 BLAH VALUE=""
 FOOBAR VALUE=""
 /SECTION

 2) Receive the values of "BLAH" and "FOOBAR" from, say, a Web form.
 3) Output an XML file with the values of "BLAH" and "FOOBAR", like:

 SECTION
 BLAH VALUE="203"
 FOOBAR VALUE="666"
 /SECTION

 4) Store said XML file with the data in a text field in a database.

 I suppose that I could use the existing XML parsr functions to parse
 the XML template in 1), and define event handlers that output the
 relevant XML tag with the specific data, like:


 function startElement($parser, $name, $attribs) {
 $data=$data . "BLAH VALUE=\"" . $blah . "\"";
 }

 (I know that the above is probably wrong; it's just an example).

 ...But I'd like to know if there's another way to do the above,
 something more... elegant.


 Paulo Jan.
 DDnet.

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

2001-02-14 Thread [EMAIL PROTECTED]

I told Apache to deny all .inc requets, ala .htaccess-style stuff in
the httpd.conf

-Szii

- Original Message -
From: Sebastian Stadtlich [EMAIL PROTECTED]
To: 'Rick Hodger' [EMAIL PROTECTED]; 'Php-General (E-Mail)
[EMAIL PROTECTED]
Sent: Wednesday, February 14, 2001 4:45 AM
Subject: AW: [PHP] Bad Practices


 OR you could tell apache to parse everything that ends with .inc with php.
 you can name it .inc .linux .linuxsucks .microsoftsucks

 (you'll need to have access to http.conf or .htaccess+right to override
...)

 sebastian

  -Ursprngliche Nachricht-
  Von: Rick Hodger [mailto:[EMAIL PROTECTED]]
  Gesendet: Mittwoch, 14. Februar 2001 09:51
  An: [EMAIL PROTECTED]
  Betreff: Re: [PHP] Bad Practices
 
 
 
  "Jeff Oien" [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   Would people like to list bad practices and also point us
   newbies to any articles online dealing with syntax, correct
   use of single and double quotes etc.?
 
  People who create scripts that include a need for access to a
  SQL database,
  meaning you need to give it a username and password then
  making the damn
  configuration file be called something stupid like config.inc.
 
  When you are scripting, using anything with a .inc extension
  is just asking
  for trouble. If someone requests that file, it'll get passed
  straight to
  them. It's a .inc, which means that PHP does not know to
  parse it. Which
  means, that person can see your usernames and passwords. And
  because it's a
  public package, they're far more likely to know the path to said file.
 
  --
  Rick Hodger
 
 
 
  --
  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] Can I do this to write out html file using fopen

2001-02-06 Thread [EMAIL PROTECTED]

Hi people,
the syntax below is what I intend to use it to write out the customer detail on a new 
file according the customer ID. I only make it rough and short and did not go too 
detail on it, have limited experience oho here in some way.
?php
(db connection bit).

$queryRequest  = "SELECT * FROM TouristRequests WHERE 
TouristRequestID='$TouristRequestID'";
$resultRequest = mysql_query($queryRequest);


//  to write out the new output file
$fileName =  "$TouristRequestID";
$fileName .= ".php3";
$htmlFile = fopen("$fileName", "w");

$linkToApp   = "https://www.manageasy.com/" . 
"requestDetail.php3?filename=$fileNameTouristRequestID=$TouristRequestID";

if (!($htmlFile)) {
print("file could not be opened.");
exit;
}

// Write out Page.
fputs($htmlFile, "? \n");
fputs($htmlFile, "if(!(\$PHP_AUTH_USER)): \n");
fputs($htmlFile, "echo 'meta http-equiv=\"refresh\" 
content=\"0;url=https://www.manageasy.com/requestDetail.php3?TouristRequestID=$TouristRequestIDfilename=$fileName\"';
 \n");
fputs($htmlFile, "exit; \n");
fputs($htmlFile, "endif \n");
fputs($htmlFile, "? \n");
fputs($htmlFile, "HTML\n");
fputs($htmlFile, "HEAD\n");
fputs($htmlFile, "TITLECustomer detail/TITLE\n");
(and blabla until the end of the file).
fputs($htmlFile, "/BODY\n");
fputs($htmlFile, "/HTML\n");

**
And there is nothing in the file requestDetail.php3 beside the sniplet for db 
connection like this:
?php
$connection = mysql_connect("$localhost", "username", "password");
 mysql_select_db("dbname", $connection);
?
*
Is this correct way to do this?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



[PHP] XML methods(SAX/expat)

2001-02-05 Thread [EMAIL PROTECTED]

When parsing a CDATA field that's being read in from a file,
if the fread() buffer fills up, does it make two calls to the CDATA
or does it wait for the closing tag to show up before firing off
to the handler?

while ($data = fread($fp,1)) // yes, I know you shouldn't use '1', but it's
an example
{
   xml_parse($parser, $data,feof($fp));
}

ie, should I set a flag if the CDATA's base64 encoded to persist over
multiple CDATA events, or does it wait for the closing tag and send all
of the data off to the handler as one batch?  Some CDATA elements
may be multiple megabyte images.  (Yes, it's from an outside source
that we have no control of.)

-Szii


-- 
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] manage number of rows displayed

2001-02-04 Thread [EMAIL PROTECTED]

No sure if i get it, very inexperience user here I am. Baiscally if the
number of records returns is 20 records, in stead of display all 20 recodrs
in one column in a page, I would like to display that as 4 columns and each
columns has 5 recodrs displayed, how can I use limit statement to do that?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Milan Mlynarcik [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Sent: Monday, February 05, 2001 2:03 AM
Subject: Re: [PHP] manage number of rows displayed


 You can use LIMIT statment in your query

 Milan Mlynarcik
 - Original Message -
 From: "Jacky@lilst" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 05, 2001 9:23 PM
 Subject: [PHP] manage number of rows displayed


 Hi,
 After I run a query, how do I set the number of rows returned to display
as
 3 or 4 columns in a page instead of one column as usual?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"





-- 
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] Bah, XML

2001-02-03 Thread [EMAIL PROTECTED]

Why is this failing?
If I comment out the  xml_set_element_handler() call, it's okay...
If I comment out the xml_parse() call, it's okay...
If I leave both of them in...it core dumps.

Ideas?

-Szii

?php

  function startElement($parser, $name, $attrs)
  {
  }

  function endElement($parser, $name)
  {
  }

  $data = "?xml version=\"1.0\"?xml/xml";

  $xmlp = xml_parser_create();
  xml_set_element_handler($xmlp, "startElement", "endElement");

  if (!xml_parse($xmlp, $data, 1))
  {
die(sprintf("XML error: %s at line %d",
  xml_error_string(xml_get_error_code($xmlp)),
  xml_get_current_line_number($xmlp)));
  }
  xml_parser_free($xmlp);
?





-- 
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] Pricing for PHP programming???

2001-02-02 Thread [EMAIL PROTECTED]

Ask the first client if they know of anyone who could utilize your skills.
As an IC, you are more than just a coder; you are the marketing,
sales, finance, and programming departments.  Look online, post
your resume, apply for jobs.  In your application cover letter,
state that you are fully qualified for the position (if you are) and
let them know that you're available for contract work if that is
acceptable to them.  Go ahead and apply for the "full time"
or "permanent" positions.  Sometimes just getting your name out
there and recognized can be invaluable.

Not recommended for everyone, but it's worked for me a fair bit -
develop a "hook."  Something that sticks, something different,
something.memorable.  I started early, and "szii" was an intentionally
hard name to type to pkill on a MUD (unless you type correctly, which
many didn't.)  *laugh*  There's too many "Mike Oxford" types running
around, and "Szii" seems to stick pretty well...so I use it. *shrug*

-Szii/Mike


- Original Message -
From: stankusn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 02, 2001 10:56 AM
Subject: Re: [PHP] Pricing for PHP programming???


 Ok.I want to start doing outside (extra) contract
work...independantly.
 I have had only
 one clientthey loved the work.and I am having problems finding
 more...I think I am just not looking in the right spotwhere would be a
 good spot to drum up bussinessdoesn't have to be a place onlinebut
 how did everyone get so many customers? Where do you get them?

 nick
 ---
 Nick.Stankus
 Software Engineer
 Logicon/Sterling Federal
 402-232-7870
 ---
 "There are two things that are infinite; Human stupidity and the
 universe. And I'm not sure about the universe." - Albert Einstein

 - Original Message -
 From: [EMAIL PROTECTED]
 To: "Wade D" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, February 02, 2001 12:51 PM
 Subject: Re: [PHP] Pricing for PHP programming???


 | When in doubt, go low - esp when you're just starting out.  If you're a
 good
 | coder, start at USD$20.  You may go from there once you're more
 comfortable
 | with the process, have a small list of clientele, and have refined your
 | working environment (it's a little different than working for a
company.)
 | If you start too high, you risk prematurely damaging your reputation, as
 well
 | as having difficulty finding clients.  Some places, like here in
 | California, you
 | need to stay within the "going rate" which is all over the place for a
 coder.
 | You'll have to evaluate it on a job-by-job basis.  If you're starting
out,
 | I wouldn't
 | go above $60/hr, but it's entirely up to you.  If you don't contract on
a
 | per project
 | basis, and stick to an hourly rate you have the option of raising that
 rate
 | at a
 | later time.  If you do it on a per project basis, you can simply raise
the
 | rate
 | between projects.  If you're too high, and have to come down it looks
bad.
 | Tactfully done, it can give the subtle illusion that they're getting a
 | "good deal"
 | on you.  It's all about image at the negotiating table, and -percieved-
 value.
 | After that it's up to you to make it happen.
 |
 | Above all, watch them taxes.  Independent Contractors get hit (in the
US)
 | with a business tax as well as the expected income tax.  1099-MISC
 | income (ie, independent contract work) can really be a nasty shock if
 | you don't account for the extra tax.  When I was first starting out, my
 first
 | year, I didn't know about it and ended up approx $10k in debt, as well
as
 | being penalized for not making quarterly tax payments.  Not a big debt,
 | but it was definately an unwelcome shock come April 15th.
 |
 | In this field your reputation is EVERYTHING.  The customer is always
 right,
 | and you should do everything you can to make them FEEL good.  Even if
 | thing's aren't going okay, as soon as they start doubting your skill,
your
 | decisions, they may doubt using you. If they like you they'll return,
 | and often times will refer you to other companies.  It's all about great
 code
 | and a "warm fuzzy" for the client.
 |
 | 'Luck
 |
 | -Szii
 |
 | At 11:23 AM 2/2/2001 -0600, you wrote:
 | So how do you know what to charge when youre independent and just
 starting?
 | 
 | 
 | _
 | Do You Yahoo!?
 | Get your free @yahoo.com address at http://mail.yahoo.com
 | 
 | 
 | --
 | 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 

RE: [PHP] Pricing for PHP programming???

2001-02-02 Thread [EMAIL PROTECTED]

tOn Fri, 2 Feb 2001, johnny p. wrote:

 Hah!  My wife has a formal education in graphics design.  My web sites
 would look like crap without her extensive layout skills.  :) I'm so
 lucky...
Ah! kindered spirit 

My wife has a formal education in Mass Communication and Public Relations 
I wouldn't be in bussiness if she was not able make presentations to drum
up clients !

BUT we still lack a graphic designer - don't  think I can afford a second
wife ;-)


Cheers

Tarique


-- 
=
   B2B Application Providers
http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.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]




Re: [PHP] Pricing for PHP programming???

2001-02-01 Thread [EMAIL PROTECTED]

If you can deal with the obscene cost of living, here in Silicon Valley,
California
you can make ~80/hr doing being just a webmaster.  ~100/hr for a GOOD coder,
and ~120+/hr for a really good "real language" coder.  That's obviously
without
benefits, options, guaranteed income, vacation, sick days, etc.

-Szii

- Original Message -
From: Jonathan Sharp [EMAIL PROTECTED]
To: Philip Olson [EMAIL PROTECTED]; Josh G [EMAIL PROTECTED]
Cc: PHP User Group [EMAIL PROTECTED]
Sent: Wednesday, January 31, 2001 6:26 PM
Subject: RE: [PHP] Pricing for PHP programming???


 Yeah, I'm consulting though...but yes there are some other options...where
 does it say $80/hour in the US?!

 -Jonathan

  -Original Message-
  From: Philip Olson [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 31, 2001 6:05 PM
  To: Josh G
  Cc: PHP User Group
  Subject: Re: [PHP] Pricing for PHP programming???
 
 
 
  One thing to keep in mind is we're mixing up contract jobs and "real"
jobs
  with contract jobs usually being much higher rates.  Not sure on any
  specifics though but real jobs are pretty secure, eight hours a day ...
so
  it's a tradeoff.  Most (if not all) quotes thus far are in regard to
  contract jobs.
 
  Philip
 
  On Thu, 1 Feb 2001, Josh G wrote:
 
   I hear you. Another thing that's hard to find, is somebody who is a
   good programmer, and a good graphic designer. I don't really know
   any, apart from myself, and I've been just shy of being called a lying
   scumbag by a few HR companies over the years when they look at
   my resume ;-)
  
   This thread has really fired up my desire to go the states US$80
   an hour for php dmn, that's a shitload more than I
   make here, which is more like US$20/hr
  
   Gfunk -  http://www.gfunk007.com/
  
   I sense much beer in you. Beer leads to intoxication, intoxication to
   hangovers, and hangovers to... suffering.
  
  
   - Original Message -
   From: "Jonathan Sharp" [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Thursday, February 01, 2001 12:49 PM
   Subject: RE: [PHP] Pricing for PHP programming???
  
  
I find this an interesting topic...
   
One thing that we've found when looking for additional PHP
  programmers to
add is that since PHP has exploded there are a lot of people out
there
coding in PHP that don't have a background in programming or
  some of the
design considerations. We've looked at various places from
  techies.com to
guru.com and haven't found that many PHP gurus out there. So
  in terms of
skill level, what do you all see the going rate? I know I'm
currently
underpaid at $25/hour and I do ALL the PHP programming, project
   management,
engineering, database theory etc...oh...and did I mention I do all
the
network support too? (I'm taking my CCNA in June...) so yeah...we're
a
starup what did you expect?! =)
   
Comments?
   
Disclaimer: I don't mean to offend anyone out there who codes
  in PHP. But
from the experience that I've had trying to find someone who
  can really
   code
clean, effecient stuff that plugs into the whole picture has been
   virtually
non-existent...(if you do, please call! We have a few openings!)
   
Thanks,
-Jonathan Sharp
   
Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
   
-Original Message-
    From: Philip Olson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 5:40 PM
    To: Shane McBride
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Pricing for PHP programming???
   
   
   
Hey Shane,
   
This is a tricky issue, here's me (USD):
   
  $60/hr
  $30/hr if end result becomes open sourced (no strings)
   
General discounts for features such as : fun,true
  non-profit,intelligent
employer,learning curve and it all lives on a sliding scale
  depending on
their ability to pay and my desire for work/money (time).
  Also, barter
is usually an option.  Usually hovers between 30-50 and one
  day this will
go up :-)  This is the most difficult part of the job, time
estimates
and pricing.  Bah.  "Just give me money and I'll do stuff."
   
Regards,
   
Philip Olson
http://www.cornado.com/
   
   
 On Wed, Jan 31, 2001 at 03:25:27PM -0500, Shane McBride wrote:
 I know this is not really a PHP question, but it should
  make for a good
 thread. :)

 I was wondering what other PHP people charge to write PHP?
  I have just
 been given a project for a fairly large customer, much larger than
I
 normally do work for. So I am VERY confused.concerned about
  how to price
 it. Most of my other PHP projects have been done for small
  single owners
 businesses, and the PHP has been pretty basic.

 Now that I can actually

Re: [PHP] contracting consulting (was [PHP] Pricing for PHP programming???)

2001-02-01 Thread [EMAIL PROTECTED]

If you're in the US, look at your local Chamber of Commerce, or other County
agencies.  Most
places have a "small business" division.  As an Independent Contractor
you're effectively a
sole-proprieter business and follow the same laws, tax hits, etc.

-Szii

- Original Message -
From: Dean Hall [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Thursday, February 01, 2001 10:43 AM
Subject: [PHP] contracting  consulting (was "[PHP] Pricing for PHP
programming???")


Somewhat related to the recent discussion on pricing for contractors, I
thought I'd ask if anyone knows of any good resources to help budding
contrators/consultants find their way around.

I'm a skilled web developer, but I'm not so knowledgeable when it comes to
law and conventions in the US for contractors and consultants doing web
development (or anything else).

If there are any good books or websites that talk about this type of
self-employment, or if anyone has personal experience they wish to offer,
please let me know.

Thanks.
Dean.



-- 
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] contracting consulting (was [PHP] Pricing for PHP programming???)

2001-02-01 Thread [EMAIL PROTECTED]

Demand is rising, insanely.  I left an NT Systems programming position for
a PHP position.  Not every company develops software, but almost every
company can benefit from a website/presence.

Most "large organizations" like turnkey solutions from large "notable"
companies.
This is one of ASPs strongest points.  However, as PHP grows, people will
notice.
Open Source ANYTHING still has a ways to go, but it's getting there.

-Szii


- Original Message -
From: Benjamin Munoz [EMAIL PROTECTED]
To: 'Dean Hall' [EMAIL PROTECTED]; PHP General [EMAIL PROTECTED]
Sent: Thursday, February 01, 2001 11:37 AM
Subject: RE: [PHP] contracting  consulting (was "[PHP] Pricing for PHP
programming???")



 Great thread. When I was changing jobs in April of 2000, a recruiter told
me
 that PHP is "cool and all", but there is zero demand for developers of PHP
 web apps (in Los Angeles). Although I've been very productive developing
in
 PHP, he advised me to learn something else, b/c the demand just isn't
there.
 I prefer PHP for my web dev, but I'm still curious how accurate he was.

 I know that that Java/EJB/JSP and COM/ASP is in MUCH more demand, and
 therefore command a higher wage.  Demand vs supply, right?.  A search
today
 on monster.com for ASP in LA yields 142 listings, Java yields 262, JSP
 yields 32, Perl yields 105, PHP yields 16, cold fusion yields 16.

 -Has the demand changed much in your city since middle of last year?
 -Also, for developers who are proficient in several web dev environments,
is
 it mostly true that you use PHP for your own personal projects, but some
 other language for big corporate clients.
 -What is the perception of PHP for mid/large organizations with more to
 risk?
 -What can we as a developer community do to change this?

 Thanks, I'm very interested in others' opinions on this.

 -Ben

 -Original Message-
 From: Dean Hall [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 01, 2001 10:43 AM
 To: PHP General
 Subject: [PHP] contracting  consulting (was "[PHP] Pricing for PHP
 programming???")


 Somewhat related to the recent discussion on pricing for contractors, I
 thought I'd ask if anyone knows of any good resources to help budding
 contrators/consultants find their way around.

 I'm a skilled web developer, but I'm not so knowledgeable when it comes to
 law and conventions in the US for contractors and consultants doing web
 development (or anything else).

 If there are any good books or websites that talk about this type of
 self-employment, or if anyone has personal experience they wish to offer,
 please let me know.

 Thanks.
 Dean.

 --
 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] HowTo: IBM DB2 w/PHP

2001-01-31 Thread [EMAIL PROTECTED]

Install the DB2 Application Development package on the client.  Let it
create
an instance.  It's just a stub instance, so it's not a real Database
Instance.
Compile (on the client) PHP using --with-ibm-db2=/usr/local/IBMdb2whatever
Use the Unified ODBC calls (they really call the DB2 CLI underneath the
covers.)

Have fun!

-Szii

- Original Message -
From: Karl J. Stubsjoen [EMAIL PROTECTED]
To: PHP Mailing List [EMAIL PROTECTED]
Sent: Tuesday, January 30, 2001 9:20 AM
Subject: [PHP] HowTo: IBM DB2 w/PHP


 Hello,

 We have succesfully installed the IBM DB2 RDMS on our Linux box and have
 successfully made a connection to our AS400.  All through command line
 though.
 I am new to PHP, and am wondering:
 How do I instantiate the IBM DB2 in PHP, call commands, run queries,
etc...?
 I'm not looking for all the answers, but tips on How to Get Started.

 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 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] ibm-db2 support

2001-01-29 Thread [EMAIL PROTECTED]

Yup.  Install the "DB2 Application Development" package and it'll give you
the
headers.

-Szii

- Original Message -
From: Bill Sneed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 28, 2001 12:49 PM
Subject: [PHP] ibm-db2 support


 Greetings:

 I'm using RH6.2, DB2 V7.1, PHP-4.0.4pl1, Apache 1.3.14, and Pgsql 7.0.3.

 I've been able to ./configure  successfully support for apache, pgsql, 
 db2 but come time to compile, make ends with the following error:

 In file included from internal_functions.c:38:
 /usr/local/php-4.0.4pl1/ext/odbc/php_odbc.h:60:sqlcli.h:
 no such file or directory
 .
 .
 .
 make ends.

 Anyone have an idea what's going on and how to fix it??

 TIA.

 bill sneed, prospect, maine.


 --
 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] debugger_on( ) third time!

2001-01-27 Thread [EMAIL PROTECTED]

On Sat, 27 Jan 2001, Rasmus Lerdorf wrote:

 The documentation is quite clear on this:
 
 http://www.php.net/manual/en/debugger.php
Ouch! Mea Minima Culpa,

Sorry!

The copy of docs which I have locally does not say this!

Should learn to mirror the latest docs from the web

Thanks again

Tarique

-- 
=
   B2B Application Providers
http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.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] db connection error: need help badly

2001-01-24 Thread [EMAIL PROTECTED]

Quoting from my previous message. I think my exact question is that when I
add a new db on to db server, How do I set up username and password to
access that db? All I did was just run the query at "mysql" database to
insert Host, username at "user" table ( left password blank)and gave all
privileges as Y. And insert Host, User at "db" table with Y privileges as
well.
And what I added to the Host field on both tables is 216.122.146.146 ( which
is the same IP susing at the code to establish db connection below.). But
the IP for my db server is 216.122.146.147.
Then I write "mysqladmin reload " .
It still did not work.   Somone told me that what added into the host field
on bothe table ( db and user) should be where I connect from, which in this
case should be 216.122.146.146, not the other IP, And the host IP in the db
connection sniplet should be the same too, right?
So is there anything I miss here?
error mesage:

 Warning: MySQL Connection Failed: Access denied for user:
'[EMAIL PROTECTED]' (Using password: NO) in
 /home/sites/site1/web/FreeSale/submitagree.php3 on line 2
 *
The sniplet is :

 $connection = mysql_connect("216.122.146.146", "freesale", "");

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -----
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 2:06 AM
Subject: RE: [PHP] db connection error


 It says that the username or password are incorrect.

 Just Double Check them!

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 6:07 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] db connection error


 Hi all,
 I got the error below when I tried to establish db coonection.

 Warning: MySQL Connection Failed: Access denied for user:
 '[EMAIL PROTECTED]' (Using password: YES) in
 /home/sites/site1/web/FreeSale/submitagree.php3 on line 2


 The sniplet is :

 $connection = mysql_connect("216.122.146.146", "freesale", "secret");

 what is the problem here?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"

 --
 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] Status of debugger_on( )

2001-01-24 Thread [EMAIL PROTECTED]

Hello 

Can someone tell me the present status of debugger_on( ) function?

Does it still exist? the documentation says it does! 

Is there someone who is really using it?

Thanks in advance

Tarique

-- 
=
   B2B Application Providers
http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.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] last_insert_id function

2001-01-24 Thread [EMAIL PROTECTED]

I got this quote right out of the php manual. My Id field happen to be type BIGINT as 
it said so I tried using LAST_INSERT_ID();  and turn out to be error said 
"unidentified function". Any clue?
***
mysql_insert_id() converts the return type of the native MySQL C API function 
mysql_insert_id() to a type of long. If your AUTO_INCREMENT column has a column type 
of BIGINT, the value returned by mysql_insert_id() will be incorrect. Instead, use the 
internal MySQL SQL function LAST_INSERT_ID().
****
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] last_insert_id function

2001-01-24 Thread [EMAIL PROTECTED]

So can I do either way as I show below here?
first could be :
$sql = "insert into user (name,email) values('Jack','[EMAIL PROTECTED]')";
$result = mysql_query($sql);
$sql1 = "insert into userFriend (userId,friendName,)
values(LAST_INSERT_ID(),'John');"
$result1 = mysql_query($sql1);

or second way is:
$sql = "insert into user (name,email) values('Jack','[EMAIL PROTECTED]')";
$lastId = mysql_insert_id();
$result = mysql_query($sql);

$sql1 = "insert into userFriend (userId,friendName,)
values($lastId,'John');"
$result1 = mysql_query($sql1);


Are these correct?

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 3:25 AM
Subject: RE: [PHP] last_insert_id function


 for example:

 $SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";

 now you have to insert into another table where you need to relate that
user
 to the entry:

 $SQL2 = "INSERT INTO questions SET question='how did you sleep?',
 made_by=LAST_INSERT_ID()";

 LAST_INSERT_ID() will be here equal to the auto_incremented id of the
first
 $SQL statement.

 Hope this helps,
 Maxim Maletsky


 -Original Message-
 From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 7:16 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] last_insert_id function


 I got this quote right out of the php manual. My Id field happen to be
type
 BIGINT as it said so I tried using LAST_INSERT_ID();  and turn out to be
 error said "unidentified function". Any clue?
 ***
 mysql_insert_id() converts the return type of the native MySQL C API
 function mysql_insert_id() to a type of long. If your AUTO_INCREMENT
column
 has a column type of BIGINT, the value returned by mysql_insert_id() will
be
 incorrect. Instead, use the internal MySQL SQL function LAST_INSERT_ID().
 
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"

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

2001-01-24 Thread [EMAIL PROTECTED]

Can we store the value retrieved by last_insert_id for later use? say we
want to related 3 queries together and under that case, we will then need to
store the first "last_insert_id value" somewhere and then retrive the second
"last_insert_id value" from the second insert query before both values will
be inserted into the third query.
Can we do that? If not, I will have to come back to mysql_insert_id(); but
it won't work with a field with data type BIGINT, will it? So I guess I
would have to change the data type too, right?
please enlighten me about this
Thank
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -----
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Mark Lipscombe' [EMAIL PROTECTED]
Cc: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 3:36 AM
Subject: RE: [PHP] last_insert_id function


 no it will keep it very well. In fact most common errors with this
function
 is that it still keeps the same value when you do something wrong.

 This issue is described in more details on every single manual that has
 LAST_INSERT_ID() in it - read where you found it ... it is written there
...
 I am sure ...

 However, on my opinion this function is very reliable. I use it a lot when
 have to create a script which splits some few huge tables into a dozen of
 well designed ones. Because redesigning the database you really have to
 relate your data to each other. LAST_INSERT_ID() does a good job.

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Mark Lipscombe [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 5:28 AM
 To: Maxim Maletsky
 Cc: 'Jacky@lilst'; [EMAIL PROTECTED]
 Subject: RE: [PHP] last_insert_id function


 Someone jump in here and correct me if I'm wrong, but by the time you
 get around to executing the second query, LAST_INSERT_ID() from MySQL
 isn't necessarily going to be the desired value, because another record
 may well have been inserted in that time?

 On 24 Jan 2001 18:25:27 +0900, Maxim Maletsky wrote:
  for example:
 
  $SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";
 
  now you have to insert into another table where you need to relate that
 user
  to the entry:
 
  $SQL2 = "INSERT INTO questions SET question='how did you sleep?',
  made_by=LAST_INSERT_ID()";
 
  LAST_INSERT_ID() will be here equal to the auto_incremented id of the
 first
  $SQL statement.
 
  Hope this helps,
  Maxim Maletsky
 
 
  -Original Message-
  From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 25, 2001 7:16 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] last_insert_id function
 
 
  I got this quote right out of the php manual. My Id field happen to be
 type
  BIGINT as it said so I tried using LAST_INSERT_ID();  and turn out to be
  error said "unidentified function". Any clue?
  ***
  mysql_insert_id() converts the return type of the native MySQL C API
  function mysql_insert_id() to a type of long. If your AUTO_INCREMENT
 column
  has a column type of BIGINT, the value returned by mysql_insert_id()
will
 be
  incorrect. Instead, use the internal MySQL SQL function
LAST_INSERT_ID().
  ****
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
  yourself"
 
  --
  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] last_insert_id function: I did already

2001-01-24 Thread [EMAIL PROTECTED]

I did try already.
What I did was I assign value from LAST_INSERT_ID(); onto a virable after I
run the first insert query the same way we do to mysql_insert_id
and the result when the page is executed, it said " unidentified function"
which of course because php does not know LAST_INSERT_ID like you said
previously.
By the way, what even drive me crazy more is that with using
mysql_insert_id();, it returns me value 0 (zero) which I suspected it comes
from the fact that data type of that field is BIGINT, correct me if I'm
wrong.
any thought?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Jacky@lilst' [EMAIL PROTECTED]; 'Mark Lipscombe'
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 4:06 AM
Subject: RE: [PHP] last_insert_id function


 I am not really sure about this one, but the first thing I would do is
that
 I would try it.

 It could be though ...

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 7:53 AM
 To: Maxim Maletsky; 'Mark Lipscombe'
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] last_insert_id function


 Can we store the value retrieved by last_insert_id for later use? say we
 want to related 3 queries together and under that case, we will then need
to
 store the first "last_insert_id value" somewhere and then retrive the
second
 "last_insert_id value" from the second insert query before both values
will
 be inserted into the third query.
 Can we do that? If not, I will have to come back to mysql_insert_id(); but
 it won't work with a field with data type BIGINT, will it? So I guess I
 would have to change the data type too, right?
 please enlighten me about this
 Thank
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 ----- Original Message -
 From: Maxim Maletsky [EMAIL PROTECTED]
 To: 'Mark Lipscombe' [EMAIL PROTECTED]
 Cc: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, January 24, 2001 3:36 AM
 Subject: RE: [PHP] last_insert_id function


  no it will keep it very well. In fact most common errors with this
 function
  is that it still keeps the same value when you do something wrong.
 
  This issue is described in more details on every single manual that has
  LAST_INSERT_ID() in it - read where you found it ... it is written there
 ...
  I am sure ...
 
  However, on my opinion this function is very reliable. I use it a lot
when
  have to create a script which splits some few huge tables into a dozen
of
  well designed ones. Because redesigning the database you really have to
  relate your data to each other. LAST_INSERT_ID() does a good job.
 
  Cheers,
  Maxim Maletsky
 
  -Original Message-----
  From: Mark Lipscombe [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, January 25, 2001 5:28 AM
  To: Maxim Maletsky
  Cc: 'Jacky@lilst'; [EMAIL PROTECTED]
  Subject: RE: [PHP] last_insert_id function
 
 
  Someone jump in here and correct me if I'm wrong, but by the time you
  get around to executing the second query, LAST_INSERT_ID() from MySQL
  isn't necessarily going to be the desired value, because another record
  may well have been inserted in that time?
 
  On 24 Jan 2001 18:25:27 +0900, Maxim Maletsky wrote:
   for example:
  
   $SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";
  
   now you have to insert into another table where you need to relate
that
  user
   to the entry:
  
   $SQL2 = "INSERT INTO questions SET question='how did you sleep?',
   made_by=LAST_INSERT_ID()";
  
   LAST_INSERT_ID() will be here equal to the auto_incremented id of the
  first
   $SQL statement.
  
   Hope this helps,
   Maxim Maletsky
  
  
   -----Original Message-
   From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, January 25, 2001 7:16 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] last_insert_id function
  
  
   I got this quote right out of the php manual. My Id field happen to be
  type
   BIGINT as it said so I tried using LAST_INSERT_ID();  and turn out to
be
   error said "unidentified function". Any clue?
   ***
   mysql_insert_id() converts the return type of the native MySQL C API
   function mysql_insert_id() to a type of long. If your AUTO_INCREMENT
  column
   has a column type of BIGINT, the value returned by mysql_insert_id()
 will
  be
   incorrect. Instead, use the internal MySQL SQL function
 LAST_INSERT_ID().
   
   Jack
   [EMAIL PROTECTED]
   "There is nothing more rewarding than reaching the goal you set for
   yourself"
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands,

[PHP] last_insert_id:sql internal function

2001-01-24 Thread [EMAIL PROTECTED]



 Don't you have to do something like this?
 $something = mysql_query("into mytable.");
 $result = mysql_query($something);
 $rs = mysql_query("select LAST_INSERT_ID() from mytable");
 $theLastInsertedID = mysql_result($rs,0,0);
 corerct?
 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"
 - Original Message -
 From: Alain Fontaine [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 24, 2001 4:18 AM
 Subject: Re: [PHP] last_insert_id function: I did already


  Hi,
 
  To use mySQL's internal function, try something like this:
 
  mysql_query("insert into mytable values(1,2,3)");
  $rs = mysql_query("select LAST_INSERT_ID() from mytable");
  $theLastInsertedID = mysql_result($rs,0,0);
 
  ""Jacky@lilst"" [EMAIL PROTECTED] a crit dans le message
news:
  05f701c0865b$a2fe61e0$[EMAIL PROTECTED]
   I did try already.
   What I did was I assign value from LAST_INSERT_ID(); onto a virable
 after
  I
   run the first insert query the same way we do to mysql_insert_id
   and the result when the page is executed, it said " unidentified
 function"
   which of course because php does not know LAST_INSERT_ID like you said
   previously.
   By the way, what even drive me crazy more is that with using
   mysql_insert_id();, it returns me value 0 (zero) which I suspected it
  comes
   from the fact that data type of that field is BIGINT, correct me if
I'm
   wrong.
   any thought?
   Jack
   [EMAIL PROTECTED]
   "There is nothing more rewarding than reaching the goal you set for
   yourself"
   ----- Original Message -
   From: Maxim Maletsky [EMAIL PROTECTED]
   To: 'Jacky@lilst' [EMAIL PROTECTED]; 'Mark Lipscombe'
   [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Wednesday, January 24, 2001 4:06 AM
   Subject: RE: [PHP] last_insert_id function
  
  
I am not really sure about this one, but the first thing I would do
is
   that
I would try it.
   
It could be though ...
   
Cheers,
    Maxim Maletsky
   
-Original Message-
From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 7:53 AM
To: Maxim Maletsky; 'Mark Lipscombe'
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] last_insert_id function
   
   
Can we store the value retrieved by last_insert_id for later use?
say
 we
want to related 3 queries together and under that case, we will then
  need
   to
store the first "last_insert_id value" somewhere and then retrive
the
   second
"last_insert_id value" from the second insert query before both
values
   will
be inserted into the third query.
Can we do that? If not, I will have to come back to
mysql_insert_id();
  but
it won't work with a field with data type BIGINT, will it? So I
guess
 I
would have to change the data type too, right?
please enlighten me about this
Thank
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
    yourself"
- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Mark Lipscombe' [EMAIL PROTECTED]
Cc: 'Jacky@lilst' [EMAIL PROTECTED];
  [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 3:36 AM
Subject: RE: [PHP] last_insert_id function
   
   
 no it will keep it very well. In fact most common errors with this
function
 is that it still keeps the same value when you do something wrong.

 This issue is described in more details on every single manual
that
  has
 LAST_INSERT_ID() in it - read where you found it ... it is written
  there
...
 I am sure ...

 However, on my opinion this function is very reliable. I use it a
 lot
   when
 have to create a script which splits some few huge tables into a
 dozen
   of
 well designed ones. Because redesigning the database you really
have
  to
 relate your data to each other. LAST_INSERT_ID() does a good job.

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Mark Lipscombe [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 25, 2001 5:28 AM
 To: Maxim Maletsky
 Cc: 'Jacky@lilst'; [EMAIL PROTECTED]
 Subject: RE: [PHP] last_insert_id function


 Someone jump in here and correct me if I'm wrong, but by the time
 you
 get around to executing the second query, LAST_INSERT_ID() from
 MySQL
 isn't necessarily going to be the desired value, because another
  record
 may well have been inserted in that time?

 On 24 Jan 2001 18:25:27 +0900, Maxim Maletsky wrote:
  for example:
 
  $SQL = "INSERT INTO users SET name='Maxim', surname='Maletsky'";
 
  now you have to insert into another table where you need to
relate
   that
 user
  to the entry:
 
  $SQL2 = "IN

[PHP] Status of debugger_on( ) (fwd)

2001-01-24 Thread [EMAIL PROTECTED]

Hello 

Can someone tell me the present status of debugger_on( ) function?

Does it still exist? the documentation says it does! 

Is there someone who is really using it?

Thanks in advance

Tarique

-- 
=
   B2B Application Providers
http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.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] Urgent help needed, sound scary when anyone did that on title :-)

2001-01-24 Thread [EMAIL PROTECTED]

Hi people,
I got here the syntax that is suppose to get the id from the "just inserted" record 
and store it in value, did not work so far and I cannot see what is wrong in there, 
can anyone give me a hint what is wrong here? ( And the reason I did not use 
mysql_insert_id here is because the ID field at my tables are all BIGINT so 
mysql_insert_id won't work, so I have to use LAST_INSERT_ID() instead). By the way, 
the error after the page is executed keep saying that "Mysql warning : 0 is not Mysql 
index" ( and point to the line "$FirstLast = mysql_result($resultlast,0,0);"). And I 
did echo for the value of $FirstLast, it showed that there is no value in there. 

Sniplet is like this: ( I tried to keep this down as much as try to give most detail 
at the same time, so apologize for too long sniplet). 

$sql1 = "insert into firsttable (firstname, lastname) values('Jack','Chan')"; 
$resultsql1 = mysql_query($sql1);
$sqlLastID = "select LAST_INSERT_ID() from firsttable";
$resultlast = mysql_query($sqlLastID);
$FirstLast = mysql_result($resultlast,0,0);

$sql2 = "insert into secondtable (FirsttableID,secfirstname, seclastname) 
values('$FirstLast','Jacky','Chany')"; 
$resultsql2 = mysql_query($sql2);
$sqlLastIDsec = "select LAST_INSERT_ID() from secondtable";
$resultlast2 = mysql_query($sqlLastIDsec);
$secondLast = mysql_result($resultlast2,0,0);

$sql3 = "insert into Thirdtable (SecondTableID,FirsttableID,Thirdfirstname, 
Thirdlastname) values('$secondLast','$FirstLast','Steve','Chan')"; 
$resultsql3 = mysql_query($sql3);
$sqlLastIDthird = "select LAST_INSERT_ID() from Thirdtable";
$resultlast3 = mysql_query($sqlLastIDthird);
$ThirdLast = mysql_result($resultlast3,0,0);

******
what have I done wrong? Please enlighten me here
Thanks

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



Re: [PHP] Urgent help needed, sound scary when anyone did that on title :-)

2001-01-24 Thread [EMAIL PROTECTED]

I don't think I can use mysql_insert_id() because the ID field in the tables
are all BIGINT Auto_Increment and I saw that in the manual, it said
mysql_insert_id will not work corerctly with this type of data.
I hope I am wrong though. But if it is as the manual said, what else could I
do?
Direct quote from the manul at the part about mysql_insert_id() is here:
***
mysql_insert_id() converts the return type of the native MySQL C API
function mysql_insert_id() to a type of long. If your AUTO_INCREMENT column
has a column type of BIGINT, the value returned by mysql_insert_id() will be
incorrect. Instead, use the internal MySQL SQL function LAST_INSERT_ID().

cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -
From: Joe Stump [EMAIL PROTECTED]
To: Jacky@lilst [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 9:25 PM
Subject: Re: [PHP] Urgent help needed, sound scary when anyone did that on
title :-)


 remove the result - so just type $id = mysql_insert_id() and it should
work
 fine.

 --Joe


 On Thu, Jan 25, 2001 at 10:21:17AM -0600, Jacky@lilst wrote:
  Hi people,
  I got here the syntax that is suppose to get the id from the "just
inserted" record and store it in value, did not work so far and I cannot see
what is wrong in there, can anyone give me a hint what is wrong here? ( And
the reason I did not use mysql_insert_id here is because the ID field at my
tables are all BIGINT so mysql_insert_id won't work, so I have to use
LAST_INSERT_ID() instead). By the way, the error after the page is executed
keep saying that "Mysql warning : 0 is not Mysql index" ( and point to the
line "$FirstLast = mysql_result($resultlast,0,0);"). And I did echo for the
value of $FirstLast, it showed that there is no value in there.
 
  Sniplet is like this: ( I tried to keep this down as much as try to give
most detail at the same time, so apologize for too long sniplet).
 
  $sql1 = "insert into firsttable (firstname, lastname)
values('Jack','Chan')";
  $resultsql1 = mysql_query($sql1);
  $sqlLastID = "select LAST_INSERT_ID() from firsttable";
  $resultlast = mysql_query($sqlLastID);
  $FirstLast = mysql_result($resultlast,0,0);
 
  $sql2 = "insert into secondtable (FirsttableID,secfirstname,
seclastname) values('$FirstLast','Jacky','Chany')";
  $resultsql2 = mysql_query($sql2);
  $sqlLastIDsec = "select LAST_INSERT_ID() from secondtable";
  $resultlast2 = mysql_query($sqlLastIDsec);
  $secondLast = mysql_result($resultlast2,0,0);
 
  $sql3 = "insert into Thirdtable
(SecondTableID,FirsttableID,Thirdfirstname, Thirdlastname)
values('$secondLast','$FirstLast','Steve','Chan')";
  $resultsql3 = mysql_query($sql3);
  $sqlLastIDthird = "select LAST_INSERT_ID() from Thirdtable";
  $resultlast3 = mysql_query($sqlLastIDthird);
  $ThirdLast = mysql_result($resultlast3,0,0);
 
  **
  what have I done wrong? Please enlighten me here
  Thanks
 
  Jack
  [EMAIL PROTECTED]
  "There is nothing more rewarding than reaching the goal you set for
yourself"

 --

 Joe Stump, PHP Hacker
 [EMAIL PROTECTED]
 http://www.miester.org/



-- 
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 help needed, sound scary when anyone did that on title :-)

2001-01-24 Thread [EMAIL PROTECTED]

I did try mysql_error() to see waht exactly is my problem and here hwat I
really need to know. My sniplet was all correct about using last_insert_id()
and the message from mysql_error(0 tells me that "no selected database".
Although I did use mysql_select_db already and I am sure there is nothing
wrong with that part of code. The real problem is when I don't think I added
user to this database properly previously so I simply went to grab another
username that provide me the access to the database, but unfortunately
different one, stupid me.
So what I cannot do here is that now I have database on mysql server call
"FreeSale" and I need to add user in it, how do I do that properly?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
- Original Message -----
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Jacky@lilst' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 24, 2001 10:22 PM
Subject: RE: [PHP] Urgent help needed, sound scary when anyone did that on
title :-)


 you know Jacky, there's another, less cool and less reliable way to get
the
 last inserted id:

 SELECT id FROM table ORDER BY id DESC;

 it will sort them all giving you the biggest id *number* (not what mysql
 keeps) and you can keep it for as many milliseconds your script will run
 more...

 So if nothing else works for you - try this...
 (depends on how secure  stable you want your application to be, of
 course...)

 Cheers,
 Maxim Maletsky

 -Original Message-
 From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 26, 2001 1:21 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Urgent help needed, sound scary when anyone did that on
 title :-)


 Hi people,
 I got here the syntax that is suppose to get the id from the "just
inserted"
 record and store it in value, did not work so far and I cannot see what is
 wrong in there, can anyone give me a hint what is wrong here? ( And the
 reason I did not use mysql_insert_id here is because the ID field at my
 tables are all BIGINT so mysql_insert_id won't work, so I have to use
 LAST_INSERT_ID() instead). By the way, the error after the page is
executed
 keep saying that "Mysql warning : 0 is not Mysql index" ( and point to the
 line "$FirstLast = mysql_result($resultlast,0,0);"). And I did echo for
the
 value of $FirstLast, it showed that there is no value in there.

 Sniplet is like this: ( I tried to keep this down as much as try to give
 most detail at the same time, so apologize for too long sniplet).

 $sql1 = "insert into firsttable (firstname, lastname)
 values('Jack','Chan')";
 $resultsql1 = mysql_query($sql1);
 $sqlLastID = "select LAST_INSERT_ID() from firsttable";
 $resultlast = mysql_query($sqlLastID);
 $FirstLast = mysql_result($resultlast,0,0);

 $sql2 = "insert into secondtable (FirsttableID,secfirstname, seclastname)
 values('$FirstLast','Jacky','Chany')";
 $resultsql2 = mysql_query($sql2);
 $sqlLastIDsec = "select LAST_INSERT_ID() from secondtable";
 $resultlast2 = mysql_query($sqlLastIDsec);
 $secondLast = mysql_result($resultlast2,0,0);

 $sql3 = "insert into Thirdtable
(SecondTableID,FirsttableID,Thirdfirstname,
 Thirdlastname) values('$secondLast','$FirstLast','Steve','Chan')";
 $resultsql3 = mysql_query($sql3);
 $sqlLastIDthird = "select LAST_INSERT_ID() from Thirdtable";
 $resultlast3 = mysql_query($sqlLastIDthird);
 $ThirdLast = mysql_result($resultlast3,0,0);

 **
 what have I done wrong? Please enlighten me here
 Thanks

 Jack
 [EMAIL PROTECTED]
 "There is nothing more rewarding than reaching the goal you set for
 yourself"

 --
 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] warning 1 is not mysql result index

2001-01-24 Thread [EMAIL PROTECTED]

I want to get the result from first row (the one next from ID field) of the table using
$HotelName = mysql_result($resultHotel,0,1) or die(mysql_error()); 
// Note that there is data in the table for sure
and I got the error back said
Warning : 1 is not a Mysql result Index .. ( and point to that aprticular line of 
course ).

What is wrong here?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"



<    1   2   3   4   5   6   >