Re: [PHP] Posting a variable

2007-04-11 Thread Richard Lynch
do much better at remembering PHP variable names than SQL column AS names. Yes, yes, I know some idiot out there will clobber their vars *lol* -- or not clobber their vars as necessary *grin*. Either way, list()'ing out all the fields you've already declared in the query (or that are implied

Re: [PHP] Posting a variable

2007-04-11 Thread Robert Cummings
On Wed, 2007-04-11 at 22:10 -0500, Richard Lynch wrote: On Wed, April 11, 2007 9:58 pm, Robert Cummings wrote: I see it as two different things being matched up in a clear unequivocal manner, to make self-documenting code. I'm all for self-documenting code, that's why I don't in practice

[PHP] PHP Session variable

2007-03-27 Thread Chris Carter
it wrong. I know I am. Chris -- View this message in context: http://www.nabble.com/PHP-Session-variable-tf3473378.html#a9693267 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Session variable

2007-03-27 Thread Erik Jones
On Mar 27, 2007, at 9:17 AM, Chris Carter wrote: Hi, I have retrieved 4 values from database. Out of which 3 are displayed on the same page and one variable, which is email address, needs to be carried to the next page through a hyper link, the next page is actually a web form. I can do

Re: [PHP] PHP Session variable

2007-03-27 Thread Richard Davey
Chris Carter wrote: session_start(); session_register (tamma); $HTTP_SESSION_VARS [tamma] = $email; Use $_SESSION. HTTP_SESSION_VARS is deprecated and hasn't been used since PHP 4.0.6 (or rather, shouldn't have been) You don't need session_register(). On the webform: ?

Re: [PHP] PHP Session variable

2007-03-27 Thread Davi
: thankYouContact.php ); ? Please advice a work around for this if I am doing it wrong. I know I am. Chris -- View this message in context: http://www.nabble.com/PHP-Session-variable-tf3473378.html#a9693267 Sent from the PHP - General mailing list archive at Nabble.com. I would try $_SESSION

[PHP] getting a variable from a file

2007-03-23 Thread Ross
I am using a script to generate a sitemap. It displays the page names (mypage.php) but I want it to display the titles. The page heads and title are generated dynamically so the line below does not work if(preg_match('title(.+)/title'i, $f, $matches)){ However all the paged titles are stored

[PHP] POST a variable

2007-03-23 Thread Dan Shirah
Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request; $max_result=mssql_query($maximum);

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() So, to come out with a comparable function with pretty reliable results, I follow this process: 1. User

RE: [PHP] POST a variable

2007-03-23 Thread Edward Kay
-Original Message- From: Németh Zoltán [mailto:[EMAIL PROTECTED] 2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 11.07-kor Dan Shirah ezt írta: The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() you wrote something earlier as far as I

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
@lists.php.net Sent: Friday, March 23, 2007 4:07 PM Subject: Re: [PHP] POST a variable The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() So, to come out

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
:* Friday, March 23, 2007 7:14 PM *Subject:* Re: [PHP] POST a variable Satyam, I'm trying to retrieve the id using the identity method, but I do not get anything returned. Do you see anything wrong with this code? $get_max = SELECT scope_identity(); $max_result = mssql_query($get_max) or die

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
PM Subject: Re: [PHP] POST a variable Sorry, I was more tailoring my question to the syntax of my query. It wasn't displaying anything for my echo. I've changed it to this now: $get_max = SELECT scope_identity(); $max_result = mssql_query($get_max) or die(mssql_error()); $max_id

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
PROTECTED] Cc: php-general php-general@lists.php.net Sent: Friday, March 23, 2007 7:48 PM Subject: Re: [PHP] POST a variable Sorry, I was more tailoring my question to the syntax of my query. It wasn't displaying anything for my echo. I've changed it to this now: $get_max = SELECT scope_identity

Re: [PHP] POST a variable

2007-03-23 Thread Børge Holen
On Friday 23 March 2007 15:45, Dan Shirah wrote: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 9:45 am, Dan Shirah wrote: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:07 am, Dan Shirah wrote: The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() I guarantee that there is a way to do it in MSSQL,

Re: [PHP] getting a variable from a file

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 5:47 am, Ross wrote: I am using a script to generate a sitemap. It displays the page names (mypage.php) but I want it to display the titles. The page heads and title are generated dynamically so the line below does not work if(preg_match('title(.+)/title'i, $f,

Re: [PHP] Re: Posting variable outside of the post form

2007-03-13 Thread Shafiq Rehman
echo $_SERVER['PHP_SELF']; ? methode=get yet I've a large PHP variable which I'd like to access afterwards as well. Is this possible somehow? O. Wyss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Posting variable outside of the post form

2007-03-13 Thread Doctorrock
Mpff, you should start by minding XSS attacks on PHP_SELF, and no echoing it as raw ... : http://blog.phpdoc.info/archives/13-XSS-Woes.html

[PHP] Re: Posting variable outside of the post form

2007-03-12 Thread Haydar Tuna
/ TURKEY Web: http://www.haydartuna.net Otto Wyss [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I submit a form back to itself with action=?PHP echo $_SERVER['PHP_SELF']; ? methode=get yet I've a large PHP variable which I'd like to access afterwards as well. Is this possible

[PHP] Re: Creating variable names from values

2007-03-08 Thread zerof
Otto Wyss escreveu: From an arry I create a table like foreach ($persons as $key = $pers) { echo tdinput name=\K$key\ type=\checkbox\ .../td td.../td } so each checkbox field has its own name created from $key. Yet how can I access these fields (names) later on? foreach

RE: [PHP] Clearing POST variable on page refresh

2006-12-19 Thread tedd
At 5:37 PM -0500 12/18/06, Beauford wrote: -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] -snip- most excellent code and advice from Richard (Thanks Richard). Hmm. I was thinking more of a one liner that would just clear the memory buffer of these variables, but

Re: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Jochem Maas
Beauford wrote: Hi, I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I really don't want to use sessions

RE: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Brad Fuller
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, December 18, 2006 3:39 AM To: Beauford Cc: PHP Subject: Re: [PHP] Clearing POST variable on page refresh Beauford wrote: Hi, I have a page with a form on it which posts to itself. The problem

Re: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Jochem Maas
Brad Fuller wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, December 18, 2006 3:39 AM To: Beauford Cc: PHP Subject: Re: [PHP] Clearing POST variable on page refresh Beauford wrote: Hi, I have a page with a form on it which posts to itself

RE: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Robert Cummings
On Mon, 2006-12-18 at 09:34 -0500, Brad Fuller wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, December 18, 2006 3:39 AM To: Beauford Cc: PHP Subject: Re: [PHP] Clearing POST vari My way of getting around this has been to put the data

Re: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Richard Lynch
On Sun, December 17, 2006 4:59 pm, Beauford wrote: I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I

RE: [PHP] Clearing POST variable on page refresh

2006-12-18 Thread Beauford
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: December 18, 2006 3:46 PM To: Beauford Cc: PHP Subject: Re: [PHP] Clearing POST variable on page refresh On Sun, December 17, 2006 4:59 pm, Beauford wrote: I have a page with a form on it which posts

[PHP] Clearing POST variable on page refresh

2006-12-17 Thread Beauford
Hi, I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I really don't want to use sessions or cookies as this is

Re: [PHP] Clearing POST variable on page refresh

2006-12-17 Thread Stut
Beauford wrote: I have a page with a form on it which posts to itself. The problem is when someone refreshes the page it enters the data into the DB again. How do I clear these variables so that doesn't happen. I tried the unset function, but no luck. I really don't want to use sessions or

Re: [PHP] Ensuring that variable contains a number

2006-12-09 Thread Richard Lynch
My take: $number = (int) $number; if ($number 1) $number = 1; You could error out for 1, or compare the original with the (int) cast to see if PHP considers them = and error out if not, while using the (int) cast to be SURE you have an int, or... But a typecast and inequality test should be

Re: [PHP] Ensuring that variable contains a number

2006-12-09 Thread Dotan Cohen
On 10/12/06, Richard Lynch [EMAIL PROTECTED] wrote: My take: $number = (int) $number; if ($number 1) $number = 1; You could error out for 1, or compare the original with the (int) cast to see if PHP considers them = and error out if not, while using the (int) cast to be SURE you have an

Re: [PHP] Ensuring that variable contains a number

2006-12-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-12-06 23:51:45 +0200: How can I ensure that a variable contains a postive integer number? I'm currently using this code: $number=(1-$number); $number=(1-$number); if ( $number1 ) { $number=1; } But I'm sure that there is a better way. What would

Re: [PHP] Ensuring that variable contains a number

2006-12-07 Thread Dave Goodchild
is_numeric will return true for a positive or negative number.

[PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen
How can I ensure that a variable contains a postive integer number? I'm currently using this code: $number=(1-$number); $number=(1-$number); if ( $number1 ) { $number=1; } But I'm sure that there is a better way. What would that be? Dotan Cohen

Re: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen
On 06/12/06, Melanie Maddix [EMAIL PROTECTED] wrote: [snip] How can I ensure that a variable contains a postive integer number? [/snip] Hi Dotan, Check the php manual for is_int() and is_numeric(). Thanks, Melanie. I completely forget- I already knew about those functions! That's what

RE: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Brad Fuller
How can I ensure that a variable contains a postive integer number? I'm currently using this code: $number=(1-$number); $number=(1-$number); if ( $number1 ) { $number=1; } But I'm sure that there is a better way. What would that be? this will check that $input is a positive

RE: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Ray Hauge
, December 06, 2006 2:20 PM To: 'php php' Subject: RE: [PHP] Ensuring that variable contains a number How can I ensure that a variable contains a postive integer number? I'm currently using this code: $number=(1-$number); $number=(1-$number); if ( $number1 ) { $number=1; } But I'm sure

Re: [PHP] Ensuring that variable contains a number

2006-12-06 Thread Dotan Cohen
[mailto:[EMAIL PROTECTED] Sent: Wednesday, December 06, 2006 2:20 PM To: 'php php' Subject: RE: [PHP] Ensuring that variable contains a number How can I ensure that a variable contains a postive integer number? I'm currently using this code: $number=(1-$number); $number=(1-$number

[PHP] Passing JAVASCRIPT variable to PHP Script...

2006-10-10 Thread Captain
. Do You really want to Upload it?...If YES, i will overwrite it. otherwise, i won't do anything. i am using javascript for popup windows. i used confirm() function(CANCEL / OK). the problem is, i am not able to get the variable value for php script. Of course, php is server side

Re: [PHP] Passing JAVASCRIPT variable to PHP Script...

2006-10-10 Thread Penthexquadium
am not able to get the variable value for php script. Of course, php is server side programming language javascript client side programming language. Plz see my code give the solution. See my progress: upload.php # Checking for the File existance

Re: [PHP] Passing JAVASCRIPT variable to PHP Script...

2006-10-10 Thread David Tulloh
that This file is exits. Do You really want to Upload it?...If YES, i will overwrite it. otherwise, i won't do anything. i am using javascript for popup windows. i used confirm() function(CANCEL / OK). the problem is, i am not able to get the variable value for php script

Re: [PHP] Passing JAVASCRIPT variable to PHP Script...

2006-10-10 Thread tedd
At 3:09 AM -0700 10/10/06, Captain wrote: If it is not possible, plz give any other solution. Expecting ur reply. It's possible, but why not do it in php -- it's simpler -- like: ?php // specify the directory where the uploaded file should end up $path = 'upload/' ; // specify the filetypes

Re: [PHP] Passing JAVASCRIPT variable to PHP Script...

2006-10-10 Thread Richard Lynch
confirm() function(CANCEL / OK). the problem is, i am not able to get the variable value for php script. Of course, php is server side programming language javascript client side programming language. You say Of course so blithely, but clearly do not yet understand the implications

[PHP] Re: Set Variable = Long HTML String?

2006-10-07 Thread sit1way
Hey all. I'm overhauling my PHP based CMS and want to know how to set a variable equal to an HTML string, but without having to escape all the quotes! Example: $var = form name=events method=POST action= select class=menus name=news

Re: [PHP] Re: Set Variable = Long HTML String?

2006-10-07 Thread John Wells
On 10/7/06, sit1way [EMAIL PROTECTED] wrote: I'm overhauling my PHP based CMS and want to know how to set a variable equal to an HTML string, but without having to escape all the quotes! Noah, meet HEREDOC. HEREDOC, meet Noah:

Re: [PHP] Re: Set Variable = Long HTML String?

2006-10-07 Thread David Tulloh
You can mingle double and singal quotes. So choose one for the PHP quotes and one for the HTML quotes, HTML will use both interchangably. For example your string could become: $var = form name='events' ...; I'd also look at the echo's inside the string, they look like they shouldn't be there.

Re: [PHP] Re: Set Variable = Long HTML String?

2006-10-07 Thread John Wells
07, 2006 12:03 PM Subject: Re: [PHP] Re: Set Variable = Long HTML String? On 10/7/06, sit1way [EMAIL PROTECTED] wrote: I'm overhauling my PHP based CMS and want to know how to set a variable equal to an HTML string, but without having to escape all the quotes! Noah, meet HEREDOC. HEREDOC

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread tedd
At 12:10 AM -0400 9/9/06, Robert Cummings wrote: On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: PHP List, I have a list of variables: $001 $002 $003 $004 And what I'd like to do is have a function which will select and return one of them. Something like: public function

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Christopher Weldon
function access_var($var) { return $this-$$var; } } $cs = new myClass; $cs-access_var('_001'); // Done BTW, please make certain that you aren't really naming your variables as $001, $002 and $003. Those are bad variable names, as PHP only allows for variables beginning

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 08:44 -0400, tedd wrote: At 12:10 AM -0400 9/9/06, Robert Cummings wrote: On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: PHP List, I have a list of variables: $001 $002 $003 $004 And what I'd like to do is have a function which will select and

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread tedd
At 11:19 AM -0400 9/9/06, Robert Cummings wrote: Or something like that. :-) $easy_peasyier = array(foo1 = 1, foo2 = 2, foo3 = 3); echo($easy_peasyier['foo1']); That's zero marks on any exam I ever wrote. You didn't properly read the business requirements that specified the

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Robert Cummings
On Sat, 2006-09-09 at 16:05 -0400, tedd wrote: At 11:19 AM -0400 9/9/06, Robert Cummings wrote: Or something like that. :-) $easy_peasyier = array(foo1 = 1, foo2 = 2, foo3 = 3); echo($easy_peasyier['foo1']); That's zero marks on any exam I ever wrote. You didn't

Re: [PHP] Using a variable to call another variable

2006-09-09 Thread Martin Marques
On Sat, 09 Sep 2006 08:55:35 -0500, Christopher Weldon [EMAIL PROTECTED] wrote: class myClass { private var $_001; private var $_002; private var $_003; public function access_var($var) { return $this-$$var; } } $cs = new myClass;

Re: [PHP] Using a variable to call another variable [SOLVED]

2006-09-09 Thread Dave M G
Martin, Tedd, Robert, Christopher, Thank you all for your advice and examples. I had not been aware that it was possible to simply add another $ ahead of the variable, to make a variable of the variable's name. And especially thank you for expressing an example in terms of a class and

[PHP] Using a variable to call another variable

2006-09-08 Thread Dave M G
PHP List, I have a list of variables: $001 $002 $003 $004 And what I'd like to do is have a function which will select and return one of them. Something like: public function returnVar($n) { return $(somehow n is made to reference the name of the variable); } And then in later scripts I

Re: [PHP] Using a variable to call another variable

2006-09-08 Thread Robert Cummings
On Sat, 2006-09-09 at 12:57 +0900, Dave M G wrote: PHP List, I have a list of variables: $001 $002 $003 $004 And what I'd like to do is have a function which will select and return one of them. Something like: public function returnVar($n) { return $(somehow n is made to

[PHP] Re: dynamic variable usage

2006-08-19 Thread Hiren Parmar
hi, I think this will make more clearance about the problem.. actully i want to compare 2 files which has all most same variable's but the values are diffrant for e.g. 1 file has username=abc and other has username = bcd ... my actul code is like ... my first file contains ... file1.php

RE: [PHP] break up variable and put each element in an array

2006-08-15 Thread Ivo F.A.C. Fokkema
On Mon, 14 Aug 2006 19:14:42 -0500, Richard Lynch wrote: On Mon, August 14, 2006 2:41 am, Ivo F.A.C. Fokkema wrote: On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: Well, if it's true that some browsers on some platforms ignore

RE: [PHP] break up variable and put each element in an array

2006-08-14 Thread Ivo F.A.C. Fokkema
On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: Well, if it's true that some browsers on some platforms ignore the W3C standard, I guess we could use: Or perhaps these browsers pre-date W3C standards. :-) Sure, but in newer

RE: [PHP] break up variable and put each element in an array

2006-08-14 Thread Richard Lynch
On Mon, August 14, 2006 2:41 am, Ivo F.A.C. Fokkema wrote: On Sat, 12 Aug 2006 16:36:36 -0500, Richard Lynch wrote: On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: Well, if it's true that some browsers on some platforms ignore the W3C standard, I guess we could use: Or perhaps

RE: [PHP] break up variable and put each element in an array

2006-08-12 Thread Richard Lynch
On Fri, August 11, 2006 2:40 am, Reinhart Viane wrote: Actually, I know that it's browser/OS dependent, cuz I had a bunch of Mac users who sent only \r all the time. This may be true only of OS 9, and you may not care about them anymore, but there it is. I also would not be so quick to

RE: [PHP] break up variable and put each element in an array

2006-08-12 Thread Richard Lynch
On Fri, August 11, 2006 3:11 am, Ivo F.A.C. Fokkema wrote: Well, if it's true that some browsers on some platforms ignore the W3C standard, I guess we could use: Or perhaps these browsers pre-date W3C standards. :-) $datelist = str_replace(array(\r\n,\n,\r),'BR',$_POST['datelist']); Two

RE: [PHP] break up variable and put each element in an array

2006-08-11 Thread Reinhart Viane
Actually, I know that it's browser/OS dependent, cuz I had a bunch of Mac users who sent only \r all the time. This may be true only of OS 9, and you may not care about them anymore, but there it is. I also would not be so quick to claim that Linux sends \r\n -- It could be dependent on the

RE: [PHP] break up variable and put each element in an array

2006-08-11 Thread Ivo F.A.C. Fokkema
On Thu, 10 Aug 2006 17:17:23 -0500, Richard Lynch wrote: On Tue, August 8, 2006 3:47 pm, Fokkema, I.F.A.C. \(HKG\) wrote: If the user separates the dates by an enter in the textarea, you need to explode on \r\n. To be able to handle both, you need to use split() or preg_split(). When I

RE: [PHP] break up variable and put each element in an array

2006-08-10 Thread Richard Lynch
On Tue, August 8, 2006 3:47 pm, Fokkema, I.F.A.C. \(HKG\) wrote: try this: $string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007; $array = explode(' ', $string); foreach ($array as $value) echo Date: $valuebr /; If the user separates the dates by an enter in

[PHP] sending a variable variables to a function

2006-08-08 Thread Ross
I want to send variable variables to a function but I cannot seem to get the syntax correct. This is what I have so far... function my_function ($$moule_no) { // do something with $$module_no } my_function ($module1) my_function ($module2) my_function ($module3) -- PHP General Mailing

Re: [PHP] sending a variable variables to a function

2006-08-08 Thread Jochem Maas
Ross wrote: I want to send variable variables to a function but I cannot seem to get the syntax correct. This is what I have so far... function my_function ($$moule_no) { // do something with $$module_no } my_function ($module1) my_function ($module2) my_function

RE: [PHP] sending a variable variables to a function

2006-08-08 Thread Peter Lauri
:[EMAIL PROTECTED] Sent: Tuesday, August 08, 2006 7:26 PM To: php-general@lists.php.net Subject: [PHP] sending a variable variables to a function I want to send variable variables to a function but I cannot seem to get the syntax correct. This is what I have so far... function my_function

[PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces (per date) and each of those pieces should be put into a text so the

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Dave Goodchild
On 08/08/06, Reinhart Viane [EMAIL PROTECTED] wrote: A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces (per date) and

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Ivo F.A.C. Fokkema
On Tue, 08 Aug 2006 14:50:53 +0100, Dave Goodchild wrote: On 08/08/06, Reinhart Viane [EMAIL PROTECTED] wrote: A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B.

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Ivo F.A.C. Fokkema
On Tue, 2006-08-08 at 16:06 +0200, Reinhart Viane wrote: try this: $string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007; $array = explode(' ', $string); foreach ($array as $value) echo Date: $valuebr /; If the user separates the dates by an enter in

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
try this: $string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007; $array = explode(' ', $string); foreach ($array as $value) echo Date: $valuebr /; If the user separates the dates by an enter in the textarea, you need to explode on \r\n. To be able to handle

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Reinhart Viane
Thx all -Oorspronkelijk bericht- Van: Ivo F.A.C. Fokkema [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 8 augustus 2006 16:17 Aan: Reinhart Viane CC: php-general@lists.php.net Onderwerp: RE: [PHP] break up variable and put each element in an array On Tue, 2006-08-08 at 16:06 +0200

Re: [PHP] break up variable and put each element in an array

2006-08-08 Thread Richard Lynch
On Tue, August 8, 2006 8:02 am, Reinhart Viane wrote: A. I have a page on which people can supply dates in a text area. Dates are entered like this: 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007 B. Now I need this Post element to be broken into pieces

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Richard Lynch
On Tue, August 8, 2006 9:06 am, Reinhart Viane wrote: try this: $string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007; $array = explode(' ', $string); foreach ($array as $value) echo Date: $valuebr /; If the user separates the dates by an enter in the

Re: [PHP] sending a variable variables to a function

2006-08-08 Thread Richard Lynch
On Tue, August 8, 2006 7:25 am, Ross wrote: I want to send variable variables to a function but I cannot seem to get the syntax correct. This is what I have so far... function my_function ($$moule_no) { For sure, you don't want $$ in the arglist. You probably want $module_varname, I

RE: [PHP] break up variable and put each element in an array

2006-08-08 Thread Fokkema, I.F.A.C. \(HKG\)
try this: $string = 3/01/2005 29/12/2005 2/01/2006 20/02/2006 28/12/2006 1/01/2007 15/02/2007; $array = explode(' ', $string); foreach ($array as $value) echo Date: $valuebr /; If the user separates the dates by an enter in the textarea, you need to explode on \r\n. To be able to handle

RE: [PHP] Re: A variable inside a variable?

2006-06-27 Thread Jeremy Schreckhise
WITH MYSQL NOT PHP; 5. net stop mysql 6. net start mysql 7. work hard; play hard -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Monday, June 26, 2006 4:13 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: A variable inside

[PHP] Re: A variable inside a variable?

2006-06-26 Thread Adam Zey
Alex Major wrote: Thanks for your help with my other question, heres a new one for you. I need to nest a variable, inside another variable. For example: $($buildingname)level How (if at all) is this possible? Thanks. Alex. Why? What are you doing that requires that that cannot be done with

[PHP] Re: A variable inside a variable?

2006-06-26 Thread Jo�o C�ndido de Souza Neto
$var=1; $var2=$var; echo $$var2; It´ll echo the $var´s value. Hope it´ll help you. Alex Major [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Thanks for your help with my other question, heres a new one for you. I need to nest a variable, inside another variable. For example:

Re: [PHP] Re: A variable inside a variable?

2006-06-26 Thread tg-php
You were on the right track, but this isn't going to work.. for a couple reasons: $var = 1; # this is fine $var2 = $var; # $var2 == 1 at this point echo $$var2; # you're going to echo $1 Putting $var in double quotes makes PHP evaluate it before assigning it to $var2, so you won't get $var

Re: [PHP] Re: A variable inside a variable?

2006-06-26 Thread Jo�o C�ndido de Souza Neto
Please excuse-me. That $ was putted by mistake. I´sorry... [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] You were on the right track, but this isn't going to work.. for a couple reasons: $var = 1; # this is fine $var2 = $var; # $var2 == 1 at this point echo $$var2; #

Re: [PHP] re: Undefined Variable

2006-04-30 Thread Stut
Smart Software wrote: while(query )//here the query is opened { table tr td ?php query-name ? /td // record from database td Please fill in your age:/td //text td input name=age type=text /td //textbox, td a href=? echo

RE: [PHP] re: undefined variable

2006-04-30 Thread ray . hauge
Original Message Subject: [PHP] re: undefined variable From: Smart Software [EMAIL PROTECTED] Date: Sun, April 30, 2006 1:50 pm To: php-general@lists.php.net //get content of textbox $q = isset($_REQUEST['$textbox']) ? $_REQUEST['$textbox'] : 0; You should use

Re: [PHP] Re: undefined variable

2006-04-30 Thread Richard Lynch
On Sun, April 30, 2006 6:17 am, Smart Software wrote: while(query )//here the query is opened Please, JUST post your real code in http://pastebin.com or something! We CANNOT figure out what the [bleep] you really have from this! { table tr td ?php query-name ? /td //

[PHP] a funny variable composition out of my daily programmer life

2006-04-19 Thread Barry
He really didn't knew what he hase done when he came to this varname. $_POST[f-art-nlid]; burn baby :D *boom* xD -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] CakePHP Undefined variable

2006-03-31 Thread Pham Huu Le Quoc Phuc
Hi everyone! I use CakePHP. I found an error. Could you help me to deal this error. Notice: Undefined variable: missing in c:\Inetpub\wwwroot\Cake\app\views\errors\missing_controller.php on line 18 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] CakePHP Undefined variable

2006-03-31 Thread chris smith
On 4/1/06, Pham Huu Le Quoc Phuc [EMAIL PROTECTED] wrote: Hi everyone! I use CakePHP. I found an error. Could you help me to deal this error. Notice: Undefined variable: missing in c:\Inetpub\wwwroot\Cake\app\views\errors\missing_controller.php on line 18 You're trying to use a variable that

[PHP] PHP HOSTNAME environment variable poltergeist

2006-03-15 Thread Ruben Rubio Rey
Im having again a problem with hostname environment varible. Hostname is set OK and it is now shown in phpinfo(). But if I run php -i hostname is set! Any ideas? Php version: 5.1.2 Configure './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-gettext' '--with-pgsql'

[PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
I have a file called userlist. I'm trying to read the file, and then echo their name and add @mdah.state.ms.us with it. In the file userlist, it looks like: userabc userdef userxyz and I have the following code: ?php $filename = userlist; $fp = fopen($filename, r) or die (Couldn't open

RE: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread jblanchard
[snip] echo $thedata.@mdah.state.ms.us; [/snip] Try echo $thedata.'@mdah.state.ms.us'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
Adam Williams wrote: I have a file called userlist. I'm trying to read the file, and then echo their name and add @mdah.state.ms.us with it. In the file userlist, it looks like: userabc userdef userxyz and I have the following code: ?php $filename = userlist; $fp = fopen($filename, r) or

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread Adam Williams
Hi, I just tried that, didn't make a difference, still not getting my expected output. [EMAIL PROTECTED] wrote: [snip] echo $thedata.@mdah.state.ms.us; [/snip] Try echo $thedata.'@mdah.state.ms.us'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread jblanchard
[snip] Hi, I just tried that, didn't make a difference, still not getting my expected output. Try echo $thedata.'@mdah.state.ms.us'; [/snip] Ooops, my bad, try echo $thedata .'@mdah.state.ms.us'; And please do not top post. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] echo'ing a variable and cat'ing text

2006-03-02 Thread John Nichel
John Nichel wrote: Adam Williams wrote: I have a file called userlist. I'm trying to read the file, and then echo their name and add @mdah.state.ms.us with it. In the file userlist, it looks like: userabc userdef userxyz and I have the following code: ?php $filename = userlist; $fp =

<    1   2   3   4   5   6   7   8   9   10   >