RE: [PHP] $_SESSION as $key=>$value

2003-06-12 Thread Ralph
Daniel, Rather than sending them to a new page to validate the form and then sending them back if a field is invalid, do the error checking from the same script. Here's an example, a bit simple but just to give you an idea. For a better explanation, you should read this article which elaborates

RE: [PHP] How do I capture a POST responce

2003-06-12 Thread Ralph
You have to use socket connection. Take a look at: http://us4.php.net/fsockopen In the User Contributed Notes look for a post by info at agriya dot com 02-Feb-2003 12:38 there you will see a script that shows you how to do it. Hope this helps. -Original Message- From: Joaco [mailto:

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Leif K-Brooks
*sigh* Just do: eval($msg); Ben Houlton wrote: I use echo $msg; eval("\$msg = \"$msg\";"); echo $msg; and it comes up with include("menu.php"); on the live page "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] www.php.net/eval Ben Houlton wrot

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ben Houlton
I use echo $msg; eval("\$msg = \"$msg\";"); echo $msg; and it comes up with include("menu.php"); on the live page "Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > www.php.net/eval > > Ben Houlton wrote: > > >Is there a way to get PHP script

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ignatius Teo
- Original Message - From: "Ben Houlton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 13, 2003 2:49 PM Subject: [PHP] Gettnig PHP code out of a DB? Er...you need to eval() it to get it to parse/run. > Is there a way to get PHP script/code out of a DB? Becasue, when I e

php-general Digest 13 Jun 2003 05:38:05 -0000 Issue 2114

2003-06-12 Thread php-general-digest-help
php-general Digest 13 Jun 2003 05:38:05 - Issue 2114 Topics (messages 151282 through 151330): Re: mail() function & exchange 151282 by: Diana 151283 by: Mark 151287 by: Diana Re: How to find if a string is an integer? 151284 by: Felipe Desiderati 1512

Re: [PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Leif K-Brooks
www.php.net/eval Ben Houlton wrote: Is there a way to get PHP script/code out of a DB? Becasue, when I enter PHP code into the textbox and hit submit, and go check the page it has nothing there with and just shows the code, e.g. include("menu.php"); without the tags, the code I'm using to impor

Re: [PHP] PHP Email....

2003-06-12 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > > Working kind of :) > > > > Get one line from it > > Kinda... I get it to return one line... > > The code: > > define('STDIN',fopen("php://stdin","r")); > $str = fgets(STDIN); > mail("[EMAIL PROTECTED]","Test","Test Test...\n\nOr

[PHP] Gettnig PHP code out of a DB?

2003-06-12 Thread Ben Houlton
Is there a way to get PHP script/code out of a DB? Becasue, when I enter PHP code into the textbox and hit submit, and go check the page it has nothing there with and just shows the code, e.g. include("menu.php"); without the tags, the code I'm using to import the DB text is below: } elsei

[PHP] LDAP problems

2003-06-12 Thread Praveen Kumar
Dear Walker, After connecting to the LDAP using ldap_connect('localhost'); you should use ldap_bind like the code given below. Hope this should help. Regards Praveen ---SOFTPRO DISCLAIMER-- Information contained in this E-MAIL and any attachment

Re: [PHP] How do I capture a POST responce

2003-06-12 Thread Jake Johnson
Try using this $_POST['var_name'] Jake Johnson http://www.plutoid.com On Thu, 12 Jun 2003, Joaco wrote: > I am writing a module that will allow a customer to process a credit card > refund thru a web interface that I am designing. The problem I am having is > that once the information is p

Re: [PHP] mysql_fetch_array(): supplied argument is not a validMySQL result resource

2003-06-12 Thread Philip Olson
It has to do with you assuming everything will work 100% of the time. It won't. mysql_query() returns false on failure, check for that. Read this recent thread: http://marc.theaimsgroup.com/?l=php-general&m=105517588819420 Also, this faq explains it: http://www.php.net/manual/en/faq.data

[PHP] mysql_fetch_array(): supplied argument is not a valid MySQL result resource

2003-06-12 Thread Ben Houlton
I'm trying to make a PHP script that automaticly makes a link on the side menu to the id page that was just made, under certain catagories. But I edited my code to cleen up soem errors and all of a sudden 3 errors came up, and I haven't been able to fix them! They are: Warning: mysql_fetch_array():

[PHP] Zend Optimizer not active?

2003-06-12 Thread Steve Yates
Starting with a working site (FreeBSD 4.7, Apache 1.3.27) using PHP 4.3.0 and the latest Zend Optimizer, I upraded to PHP 4.3.2. Afterwards, phpinfo () did not show the Optimizer as loaded. Reinstalling Optimizer did not change this, nor did uninstalling and reinstalling Optimizer. There were

RE: [PHP] POST detection

2003-06-12 Thread Johnny Martinez
Will this work for $_GET as well? J -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] POST detection On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring script that $_P

[PHP] How do I capture a POST responce

2003-06-12 Thread Joaco
I am writing a module that will allow a customer to process a credit card refund thru a web interface that I am designing. The problem I am having is that once the information is posted to the gateway, it returns a url encoded string with the responce from the transaction. How can I capture that re

[PHP] Re: Url problem

2003-06-12 Thread DvDmanDT
The file get's parsed server side I guess... You would need to name it .txt or something for that to work... :p "Sparky Kopetzky" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: inc

Re: [PHP] make a variable not exist?

2003-06-12 Thread Leif K-Brooks
And won't generate a notice. Alex Earl wrote: You can unset the variable www.php.net/unset but also I would recommend using if(!isset($variable)) instead of just if(!$variable) its a little more clear as to what you are really trying to see I think. Alex -- The above message is encrypted with

Re: [PHP] 4.3.2 -- does connection_status() actually work?

2003-06-12 Thread Rasmus Lerdorf
On Thu, 12 Jun 2003, Per Jessen wrote: > Shouldn't the following work - or rather why doesn't it : > > > ignore_user_abort(0); > > for( $i=100; $i; $i-- ) > { > if ( connection_status() ) exit(0); > print " blurp."; flush(); >

[PHP] $_SESSION as $key=>$value

2003-06-12 Thread Daniel J. Rychlik
Is this valid to iterate over a form variables.? foreach ($_SESSION as $key=>$value) and another question, do I need this in my form? Im really struggling with $_SESSION. Im trying to program smarter and make friendlier applications. Ive submitted several emails dealing with this func

Re: [PHP] 4.3.2 -- does connection_status() actually work?

2003-06-12 Thread Jeff Harris
On Jun 12, 2003, "news" claimed that: |Shouldn't the following work - or rather why doesn't it : | | |ignore_user_abort(0); | |for( $i=100; $i; $i-- ) |{ |if ( connection_status() ) exit(0); |print " blurp."; flush(); |sleep(1

RE: [PHP] POST detection

2003-06-12 Thread Johnny Martinez
Woot! That worked! Thanks Jason and R'twick! Johnny -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 2:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] POST detection On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring

Re: [PHP] make a variable not exist?

2003-06-12 Thread Alex Earl
> > Is there a way to make a variable not exist? There are several places > where I test (!$variable), and I want to be able to change the > variable to pass that test, even though it exists, under certain > circumstances. > > Thanks. > You can unset the variable www.php.net/unset but also I wou

[PHP] make a variable not exist?

2003-06-12 Thread Amanda McComb
Is there a way to make a variable not exist? There are several places where I test (!$variable), and I want to be able to change the variable to pass that test, even though it exists, under certain circumstances. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] POST detection

2003-06-12 Thread R'twick Niceorgaw
if ( isset($_POST['var_1']) and isset($_POST['var_2']) ) { your code } - Original Message - From: "Johnny Martinez" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 5:08 PM Subject: [PHP] POST detection > Hi all, > I have a self referring script t

Re: [PHP] POST detection

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 05:08, Johnny Martinez wrote: > I have a self referring script that $_POST's two times at the beginning. > The problem is that the first time the script comes up those two $_POST > vars aren't being submitted and the webserver complains. > > If I could detect if the vars wer

Re: [PHP] Url problem

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 04:55, Sparky Kopetzky wrote: > I'm trying this, it doesn't work and I can't figure out why: > > include_once $SYSTEM_URL . "/classes/category.php"; where $SYSTEM_URL = > "http://www.example.com"; is the url to the web site. and I get this error: > > Fatal error: Cannot

[PHP] POST detection

2003-06-12 Thread Johnny Martinez
Hi all, I have a self referring script that $_POST's two times at the beginning. The problem is that the first time the script comes up those two $_POST vars aren't being submitted and the webserver complains. If I could detect if the vars were passed and if not then skip that would be great. What

Re: [PHP] Vmailmgr Functions

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 04:43, Philip Olson wrote: > The manual over at phpbuilder is useless, and very old. Do > not use that manual, use php.net/manual Talking of manuals, what happened to the extremely useful index of functions that used to be in the appendix? -- Jason Wong -> Gremlins Asso

[PHP] Url problem

2003-06-12 Thread Sparky Kopetzky
OK. I'm suffering from brain gas... I'm trying this, it doesn't work and I can't figure out why: include_once $SYSTEM_URL . "/classes/category.php"; where $SYSTEM_URL = "http://www.example.com"; is the url to the web site. and I get this error: Fatal error: Cannot instantiate non-existent c

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Brent Baisley
Hmmm, didn't think about that. Here's something simple that seems to work in a couple of tests. if(strlen($testValue-0) == strlen($testValue)) { echo "Is a number"; } else { echo "Is not a number"; } Or, in one line: (strlen($testValue-0) == strlen($testValue) ? 1 : 0) Kind of a kludge, but it

Re: [PHP] Vmailmgr Functions

2003-06-12 Thread Philip Olson
On Thu, 12 Jun 2003, John Nichel wrote: > On PHPBuilder.com, they have functions listed for Vmailmgr in their > manual, whereas on PHP.net, no such functions exist. Do these functions > exist but not documented on PHP.net? The manual over at phpbuilder is useless, and very old. Do not use tha

RE: [PHP] Headers in body - what am I doing wrong???

2003-06-12 Thread Jeff Harris
On Jun 12, 2003, "-{ Rene Brehmer }-" claimed that: |>You have an extra \r\n. There is one contained in the variable $from so the |>line $headers .= "From: ".$from."\r\n"; is putting \r\n\r\n which signifies |>the end of the headers and the begining of the message body. | |Stupid me ... so simple

[PHP] Vmailmgr Functions

2003-06-12 Thread John Nichel
On PHPBuilder.com, they have functions listed for Vmailmgr in their manual, whereas on PHP.net, no such functions exist. Do these functions exist but not documented on PHP.net? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error display

2003-06-12 Thread John Nichel
Alex Earl wrote: I have error reporting set to E_ALL, but no matter what I do, no errors display. Is there somewhere else in the .ini that I have to set something? I believe there is a print_errors or show_errors directive in the php.ini file. Check on php.net for sure. Alex Thanks guys. -- PH

Re: [PHP] Error display

2003-06-12 Thread John Nichel
Belay this question. Found it. display_errors = On John Nichel wrote: I have error reporting set to E_ALL, but no matter what I do, no errors display. Is there somewhere else in the .ini that I have to set something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Error display

2003-06-12 Thread Alex Earl
> I have error reporting set to E_ALL, but no matter what I do, no errors > display. Is there somewhere else in the .ini that I have to set > something? > I believe there is a print_errors or show_errors directive in the php.ini file. Check on php.net for sure. Alex -- PHP General Mailing List

[PHP] Error display

2003-06-12 Thread John Nichel
I have error reporting set to E_ALL, but no matter what I do, no errors display. Is there somewhere else in the .ini that I have to set something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Alex Earl
> Jumping in a little late here, but what about is_numeric()? > Haven't tried it, but the php manual for is_int says: > Note: To test if a variable is a number or a numeric string (such as > form input, which is always a string), you must use is_numeric(). > The problem with is_numeric() is that

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Brent Baisley
Jumping in a little late here, but what about is_numeric()? Haven't tried it, but the php manual for is_int says: Note: To test if a variable is a number or a numeric string (such as form input, which is always a string), you must use is_numeric(). On Thursday, June 12, 2003, at 03:31 PM, CPT Jo

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Jason Wong
On Friday 13 June 2003 03:49, DvDmanDT wrote: > To be honest, I haven't really understood what three of them does... Is it > the same value without type casting? It takes into account the variable type as well: (1 == '1') // true (1 === '1') // false -- Jason Wong -> Gremlins Associates ->

Re: [PHP] w32api functions?

2003-06-12 Thread DvDmanDT
Just wanted to download sources... But that's kinda impossible... 404 on every single mirror, both bz and gz... Hmm... I guess I'll go for snaps then... :p Someone, please fix this... "Dvdmandt" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Prebuilt.. Compiling myself is to comp

[PHP] 4.3.2 -- does connection_status() actually work?

2003-06-12 Thread Per Jessen
Shouldn't the following work - or rather why doesn't it : ignore_user_abort(0); for( $i=100; $i; $i-- ) { if ( connection_status() ) exit(0); print " blurp."; flush(); sleep(1); } print "Done."; This is php

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread DvDmanDT
To be honest, I haven't really understood what three of them does... Is it the same value without type casting? "Jean-Christian Imbeault" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Dvdmandt wrote: > > It's not that killing... :p > > preg_match("#^-?[0-9]+$#",$_POST["var_int"])

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Alex Earl
>> >> > Sorry, I don´t know that you needed an effective snipet. And you are >> > right, >> > I only writed for positive integers. Try something like apply 2 type > cast >> > simunltaneous. >> > >> > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"]) >> > echo "is int"; >> > >> >> >

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread CPT John W. Holmes
> > > Sorry, I don´t know that you needed an effective snipet. And you are > > right, > > I only writed for positive integers. Try something like apply 2 type cast > > simunltaneous. > > > > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"]) > > echo "is int"; > > > > > Why not just

Re: [PHP] w32api functions?

2003-06-12 Thread DvDmanDT
Prebuilt.. Compiling myself is to complicated... But check the manual... 4.2.0-4.2.3 is the only versions suporting it it says... "Mark Roedel" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] Removed? $PHPDIR/ext/w32api still seems to exist in the 4.3.2 I just installed. Did you co

RE: [PHP] w32api functions?

2003-06-12 Thread Roedel, Mark
Removed? $PHPDIR/ext/w32api still seems to exist in the 4.3.2 I just installed. Did you compile your own, or download a prebuilt binary? --- Mark Roedel | "Blessed is he who has learned to laugh Systems Programmer| at himself, for he shall never cease LeTourneau University | to

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Alex Earl
> Sorry, I don´t know that you needed an effective snipet. And you are > right, > I only writed for positive integers. Try something like apply 2 type cast > simunltaneous. > > if ( (string) ((int) $_POST["var_int"]) == $_POST["var_int"]) > echo "is int"; > Why not just use the is_int() func

Re: [PHP] Re: mail() function & exchange

2003-06-12 Thread Diana
Hi, my company set their server up not to talk SMTP (disabled all --> that guy told me), and my tries to connect or talk to any of their Exchange servers failed :( so he must be true. Got onto their NT servers though ;) All the company uses Outlook & Exchange, & they use mapi to talk to each other.

[PHP] w32api functions?

2003-06-12 Thread DvDmanDT
Hello everyone... I was wondering why the w32api functions were removed? And will they come back? Else, will the 4.2.3 version work with 4.3.2? I really want those functions for educational purposes you see... Thanks in advance // DvDmanDT -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Re: How to format a strign with a generic mask??

2003-06-12 Thread Felipe Desiderati
Thanks, helps a lot!! []´s Felipe > "Felipe Desiderati" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >I need a simple function that takes a string and formats > > with a generic mask. Like this example above: > > > >$string1 = "12345678" > >$string2 = "11062003" > > > >echo for

Re: [PHP] How to find if a string is an integer?

2003-06-12 Thread Felipe Desiderati
> Felipe Desiderati wrote: > > try this: > > > > if (ereg("^[0-9]+$", $_POST["var_int")) > > echo "is int"; > > That's not the best regexp. It doesn' take into account negative > integers and isn't there a [[:numeric:]] or something like regexp that > would work better. > > I'm looking for the

Re: [PHP] Re: mail() function & exchange

2003-06-12 Thread Mark
--- Diana <[EMAIL PROTECTED]> wrote: > I totally agree with your first sentence *grin*. > Anyways, I won`t be able to use your class because my > server is kind of "locked" in their network, meaning I > don`t have the possibility to connect outside, only to > their servers (NT servers). And as Exc

Re: [PHP] Re: mail() function & exchange

2003-06-12 Thread Diana
I totally agree with your first sentence *grin*. Anyways, I won`t be able to use your class because my server is kind of "locked" in their network, meaning I don`t have the possibility to connect outside, only to their servers (NT servers). And as Exchange servers don`t use SMTP (meaning the whole

[PHP] Re: General question...

2003-06-12 Thread Bobby Patel
You can try using the cURL package with PHP. I use it with a system call. $curl_path = /usr/bin/curl; # or full path of curl $post = 'amount=3.40&merchant_id=2351235'; #POST key value pairs with &, these variables will be POSTed to site $command = "$curl_path -d \"$post\" $gateway_url"; exec($

Re: [PHP] uploading files after passing vars between forms

2003-06-12 Thread Artoo
I didn't know that Thanks for the info. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Don't forget uploaded files are removed after confirmation.php finishes. > You need to move them to a temporary directory. > > Artoo wrote: > > Hey > > > > I'm confused! > > >

Fw: [PHP] uploading files after passing vars between forms

2003-06-12 Thread Kevin Stone
- Original Message - From: "Artoo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 10:16 AM Subject: [PHP] uploading files after passing vars between forms > Hey > > I'm confused! > > Do I use move_uploaded_file() or copy() and what is the first parameter of > b

Re: [PHP] 4 hours staring - can't see clear.

2003-06-12 Thread John Taylor-Johnston
Lars, Much thanks. Life saving :) Ignatius, I like your idea. Thanks to you too. John > if (isset($var[$key]['Option'])) > { > // Flag that we got one this time round. > $found = true; > // Get the translated name from $var. > $recor

Re: [PHP] uploading files after passing vars between forms

2003-06-12 Thread Marek Kilimajer
Don't forget uploaded files are removed after confirmation.php finishes. You need to move them to a temporary directory. Artoo wrote: Hey I'm confused! Do I use move_uploaded_file() or copy() and what is the first parameter of both in the following case: form portion of upload.htm -

Re: [PHP] Headers in body - what am I doing wrong???

2003-06-12 Thread -{ Rene Brehmer }-
It's not future when I send them ... my clock's within the 15 second limit my NTP sync allows... but maybe the time difference causes ezmlm to do some dancing when sending it out ?? I know listserv based lists can get confused about the time differences... but thanks anyway ;-) Rene At 22:50

[PHP] uploading files after passing vars between forms

2003-06-12 Thread Artoo
Hey I'm confused! Do I use move_uploaded_file() or copy() and what is the first parameter of both in the following case: form portion of upload.htm -- Upload.htm asks for the image to be uploaded and passes of to confirmation.php which allows the u

RE: [PHP] Headers in body - what am I doing wrong???

2003-06-12 Thread -{ Rene Brehmer }-
At 22:31 11-06-2003, Jennifer Goodie wrote: >// pull fields from form query >$to = "[EMAIL PROTECTED]"; >$name = $HTTP_POST_VARS['name']; >$address = $HTTP_POST_VARS['address']; >$listname = $HTTP_POST_VARS['listname']; >$action = strtoupper($HTTP_POST_VARS['action']); > >

Re: [PHP] array

2003-06-12 Thread Diana Castillo
you ´re right, I had used the same variable name as something else in between ! thanks. - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Diana Castillo" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 5:58 PM Subject: Re: [PHP] array > Nothing

Re: [PHP] array

2003-06-12 Thread Leif K-Brooks
Nothing as far as I can tell. It works fine for me. Diana Castillo wrote: If I write a code like this, $room_type=array(); $room_type[0][0]=4; echo "value in array is ".$room_type[0][0]; yet I dont get any results out, what did i do wrong? -- The above message is encrypted with double rot13

Re: [PHP] array

2003-06-12 Thread Philip Olson
On Thu, 12 Jun 2003, Diana Castillo wrote: > If I write a code like this, > $room_type=array(); > $room_type[0][0]=4; > echo "value in array is ".$room_type[0][0]; > yet I dont get any results out, what did i do wrong? Nothing wrong with this code, it will work. Your error must be somewhere else

[PHP] Re: array

2003-06-12 Thread R'twick Niceorgaw
Your code works fine here (Apache 1.3.27/PHP 4.3.2) However you can try $room_type=array(); $room_type[0]=Array(); $room_type[0][0]=4; echo "value in array is ".$room_type[0][0]; HTH R'twick "Diana Castillo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If I write a code like t

Re: [PHP] Vars inside an sql query [Regular expression question]- Again

2003-06-12 Thread Marek Kilimajer
Now I noticed you did not escape backslash that was supposed to escape the dolar sign. preg_match_all("/^.*('\\\$(.*)')/si", $fcontents,$matches); ^ ^ Hatem Ben wrote: Well, it's finally working, but still very confusing ... thanks all $fcontents = join('' , file('query.t

[PHP] array

2003-06-12 Thread Diana Castillo
If I write a code like this, $room_type=array(); $room_type[0][0]=4; echo "value in array is ".$room_type[0][0]; yet I dont get any results out, what did i do wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] General question...

2003-06-12 Thread Jason Paschal
ppl, you're missing the point. you keep re-stating his problem. he knows it's not good to make the 3rd party gateway so obvious. he's looking for a way to make it transparent, so it looks like it's actually part of his site. i think there should be a way to do it. maybe use the fsock stuff t

Re: [PHP] Vars inside an sql query [Regular expression question] - Again

2003-06-12 Thread Hatem Ben
Well, it's finally working, but still very confusing ... thanks all Regards, Hatem - Original Message - From: "Hatem Ben" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Marek Kilimajer" <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 4:35 PM Subject: Re: [PHP] Vars inside an sql que

RE: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread James E Hicks III
The following has solved my problem. Thanks to all who helped. $the_array=array(); -Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2003 10:14 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Easier way to delete all entries in an array? At 16:13 12-6-0

Re: [PHP] Re: Using register_globals

2003-06-12 Thread Philip Olson
Won't this topic just die? :) register_globals is not insecure, users are insecure. Yes, you can write insecure code with it on or off, and secure code with it on or off. By users I mean people who write code, and people who use it (the evil users are the ones that use the website, and pass alo

RE: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Monu Ogbe
Or perhaps, $the_array = array(); Monu -Original Message- From: Wendell Brown [mailto:[EMAIL PROTECTED] Sent: 12 June 2003 16:31 To: James E Hicks III; [EMAIL PROTECTED] Subject: Re: [PHP] Easier way to delete all entries in an array? On Thu, 12 Jun 2003 10:13:10 -0400, James E Hicks I

Re: [PHP] Vars inside an sql query [Regular expression question] - Again

2003-06-12 Thread Hatem Ben
It's not working also - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Hatem Ben" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 5:23 PM Subject: Re: [PHP] Vars inside an sql query [Regular expression question] - Again > preg_match_all("/^(

Re: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Wendell Brown
On Thu, 12 Jun 2003 10:13:10 -0400, James E Hicks III wrote: >There's got to be an easier way, is there? > >for ($i=0; $i < count($the_array); $i++){ > array_pop($the_array); >} Maybe this: unset( $the_array ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: [PHP] Vars inside an sql query [Regular expression question] - Again

2003-06-12 Thread Monu Ogbe
Right then. Here's what I have done, and it works: ===Contents of query.txt=== ===End Contents of query.txt=== Then: ===Contents of parse.php=== ===End Contents of parse.php=== Now, whereas this works, I am still looking for a way to store and interpolate variables contained in "q

Re: [PHP] Vars inside an sql query [Regular expression question]- Again

2003-06-12 Thread Marek Kilimajer
preg_match_all("/^('\$(.*)')/si", $fcontents,$matches); ^^ you don't allow any character between start of the string and single quote. preg_match_all("/^.*('\$(.*)')/si", $fcontents,$matches); Hatem Ben wrote: I'm asking again the same question, coz i guess my question wasn't clear

[PHP] Re: your mail

2003-06-12 Thread Philip Olson
> > Looks still broken to me :) > > yup, but I don't get the problem, everything seems fine on my box.. maybe > a problem with vim comments ? can you commit the _right_ WS fix ? > > thanks in advance :) TABS are EVIL! :) Regards, Philip -- PHP General Mailing List (http://www.php.net/) To un

[PHP] Vars inside an sql query [Regular expression question] - Again

2003-06-12 Thread Hatem Ben
I'm asking again the same question, coz i guess my question wasn't clear. i just need to retreive vars inside query.txt, my regular expression seems to be correct for me, but i don't find why it doesn't wrk -- Starting query.txt select * FROM `table` where id='$value' order by name -- E

Re: [PHP] General question...

2003-06-12 Thread Brian McGarvie
it detracts from the experiance of user consistency if you are suddenly in a nice site then presented with a crappy looking payment page ;) "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Do you think the users will trust your site that much they will be > willing t

[PHP] Re: PHP and XML-RPC on MS Windows

2003-06-12 Thread Evandro Sestrem
Erich, Yes, it's possible to do the same. What XML-RPC implementation to PHP are you using? Evandro Sestrem "Erich Kolb" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > What do I have to do in order to use the XML-RPC functionality on a Windows > based machine? It was fairly

Re: [PHP] Re: Vars inside an sql query [Regular expression question]

2003-06-12 Thread Hatem Ben
I agree with you Jay, but those cases are already done, and i got no problem with RE there Thanks anyway Hatem - Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Monu Ogbe" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 12, 2003 3:17 PM Subject: RE: [PHP]

Re: [PHP] PHP extensions and multiple source files?

2003-06-12 Thread Marek Kilimajer
Simply list *.c all files as arguments to gcc: gcc one.c two.c three.c -shared -o my_ext.so Ed wrote: Howdy folks! Is there a way to have multiple *.c source files and still end up with a single *.so while using gcc? How would that be reflected in the config.m4 file? I searched for examples in

Re: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Chris Hayes
At 16:13 12-6-03, you wrote: There's got to be an easier way, is there? for ($i=0; $i < count($the_array); $i++){ array_pop($the_array); } $the_array=array(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Easier way to delete all entries in an array?

2003-06-12 Thread James E Hicks III
There's got to be an easier way, is there? for ($i=0; $i < count($the_array); $i++){ array_pop($the_array); } James E Hicks III Noland Company 2700 Warwick Blvd Newport News, VA 23607 757-928-9000 ext 435 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] A simple request from a simple person

2003-06-12 Thread Marek Kilimajer
Location header requires full uri (at least that's what is in the rfc): header("Location: http://www.server.com/wherever.php";); exit(); Jay Blanchard wrote: [snip] I would like to know how to do a simple redirect from a php page. [/snip] Look up 'header' on php.net header("Location: wherever.php"

Re: [PHP] General question...

2003-06-12 Thread Valentin
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Do you think the users will trust your site that much they will be > willing to give you their credit card information? How would they know > you won't keep this information? > I'm going to make only cosmetic changes

RE: [PHP] Re: Vars inside an sql query [Regular expression question]

2003-06-12 Thread Monu Ogbe
Ben, heredocs seem to do just what you are asking. http://www.onlamp.com/pub/a/php/2003/04/10/php_heredocs.html If I can "include()" a file inside this construct, then it will solve my problem too :-? Monu -Original Message- From: Monu Ogbe Sent: 12 June 2003 14:12 To: [EMAIL PROTE

[PHP] Re: A simple request from a simple person

2003-06-12 Thread KK
header("location: mypage.php"); "Mark Roberts" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Obviously relatively new to php I would like to know how to do a simple redirect from a php page. For example in ASP I do response.redirect("thispage.com") Want to do the same thing i

RE: [PHP] piping email directly into PHP

2003-06-12 Thread Adrian Teasdale
Thanks Brent, now that's an interesting angle I'd not thought about :) Thanks for this Ade > -Original Message- > From: Brent Baisley [mailto:[EMAIL PROTECTED] > Sent: 12 June 2003 13:30 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] piping email directly into PHP

Re: [PHP] General question...

2003-06-12 Thread Marek Kilimajer
Do you think the users will trust your site that much they will be willing to give you their credit card information? How would they know you won't keep this information? Valentin wrote: hi Jason, In my site I use a payment system, but unfortunately, there is a "moment" when the client must ente

RE: [PHP] Re: Vars inside an sql query [Regular expression question]

2003-06-12 Thread Jay Blanchard
[snip] $string = "select * FROM `table` where id='$value' order by name"; [/snip] I know it ain't pretty, but the coding style we have accepted is this $string = "select * FROM `table` where id = '" . $value . "' order by name "; or (we requite caps on reserved words)... $string = "SE

RE: [PHP] Re: Vars inside an sql query [Regular expression question]

2003-06-12 Thread Monu Ogbe
Hi, I'll join the conversation, because I have a similar problem. PHP "interpolates" variable values in strings if these are enclosed in double quotes: e.g., $string = "select * FROM `table` where id='$value' order by name"; PHP does not interpolate variables contained in strings delimi

Re: [PHP] General question...

2003-06-12 Thread Valentin
hi Jason, In my site I use a payment system, but unfortunately, there is a "moment" when the client must enter his card data into the page "owned" by the company that makes transactions (sorry for this descriptive bad english). The problem is that the design of this page is quite different then min

Re: [PHP] Re: Using register_globals

2003-06-12 Thread Jim McNeely
I'm a bit of a neophyte with php, and I've read through lots of prior posts and the php.net online docs, but some of this is still not registering in my head. TIA for your patience. I've got a script I include at the head of each of my scripts that checks $_POST['username'] and $_POST['password

Re: [PHP] General question...

2003-06-12 Thread Jason Wong
On Thursday 12 June 2003 21:53, Valentin wrote: Please use a descriptive subject! > is it possible with php: > first to pass request to another URL and after that to get the html > responce as a string and put it into php $variable? Simplest: fopen() For alternatives, search archives. -- Jaso

[PHP] Re: form name and submit test

2003-06-12 Thread Pete Morganic
Put a hidden field in the form and give it the same name as the forms eg I'm pretty sure the form name is not sent to the server - but i may be wrong pete Amanda McComb wrote: If I have multiple forms on a page, and each form has it's own name, how can I tell which form has submitted? -- PHP

[PHP] General question...

2003-06-12 Thread Valentin
hi all, is it possible with php: first to pass request to another URL and after that to get the html responce as a string and put it into php $variable? best, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: shorthand "if" notation

2003-06-12 Thread Pete Morganic
Its a ternary operator look at http://www.phpbuilder.com/board/showthread.php?threadid=10235547 http://www.phpbeginner.com/columns/maxim/ternary pete Adrian Greeman wrote: I am confused by the shorthand "if" notation. For example I just saw this PHP snippet on another forum I think it is an if

  1   2   >