Re: [PHP] Variables with - in their name

2012-11-18 Thread Nathan Nobbe
On Sat, Nov 17, 2012 at 11:09 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I have made the following variable in a form: (I am referring the select ) ?php $row['promo_code_prefix'] = 42; $row['promo_code_suffix'] = 2; echo select name=\distributor- . $row['promo_code_prefix']

Re: [PHP] Variables with - in their name

2012-11-18 Thread Ashley Sheridan
On Sun, 2012-11-18 at 01:37 -0700, Nathan Nobbe wrote: On Sat, Nov 17, 2012 at 11:09 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I have made the following variable in a form: (I am referring the select ) ?php $row['promo_code_prefix'] = 42; $row['promo_code_suffix']

Re: [PHP] Variables with - in their name

2012-11-18 Thread tamouse mailing lists
On Sun, Nov 18, 2012 at 5:12 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Sun, 2012-11-18 at 01:37 -0700, Nathan Nobbe wrote: On Sat, Nov 17, 2012 at 11:09 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I have made the following variable in a form: (I am referring the

[PHP] Variables with - in their name

2012-11-17 Thread Ron Piggott
I have made the following variable in a form: (I am referring the select ) ?php $row['promo_code_prefix'] = 42; $row['promo_code_suffix'] = 2; echo select name=\distributor- . $row['promo_code_prefix'] . - . $row['promo_code_suffix'] . \ style=\text-align: center;\\r\n; ? It could be

Re: [PHP] Variables via url

2012-05-12 Thread Ashley Sheridan
On Sun, 2012-05-13 at 01:57 +1000, Tom Rogers wrote: Hello Ashley, Saturday, May 12, 2012, 9:15:23 AM, you wrote: Can someone point me at examples or directions on how I can pass a variable via a URL in the following way: http://server.domain.com//script///variable/

Re: [PHP] Variables via url

2012-05-12 Thread Adam Richardson
On Sat, May 12, 2012 at 12:25 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: As this method requires an Apache restart, I don't see what advantage you have over using an .htaccess file? Performance: http://httpd.apache.org/docs/current/howto/htaccess.html You should avoid using

[PHP] Variables via url

2012-05-11 Thread Ashley M. Kirchner
Can someone point me at examples or directions on how I can pass a variable via a URL in the following way: http://server.domain.com//script///variable/ I will only be passing one single /variable/. And I want the /script/ to use that. I don't want to see what the script

Re: [PHP] Variables are empty only in fwrite

2012-03-18 Thread Tamara Temple
On Thu, 15 Mar 2012 11:30:20 -0400, Larry lrr...@gmail.com sent: Hello, when I pass a variable whose value originally came from $_GET or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty string. Note that the file is successfully opened and written to by the script, but the

[PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
Hello, when I pass a variable whose value originally came from $_GET or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty string. Note that the file is successfully opened and written to by the script, but the variable that originally came from $_GET does not have its value

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Daniel P. Brown
On Thu, Mar 15, 2012 at 11:30, Larry lrr...@gmail.com wrote: Hello, when I pass a variable whose value originally came from $_GET or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty string. Note that the file is successfully opened and written to by the script, but the variable

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Mar 15, 2012 at 11:30, Larry lrr...@gmail.com wrote: Hello, when I pass a variable whose value originally came from $_GET or $_REQUEST to fwrite, fwrite behaves as if it was passed an empty string. Note

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Matijn Woudt
On Thu, Mar 15, 2012 at 4:59 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Mar 15, 2012 at 11:30, Larry lrr...@gmail.com wrote: Hello, when I pass a variable whose value originally came from $_GET or $_REQUEST to

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 4:59 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Mar 15, 2012 at 11:30, Larry lrr...@gmail.com wrote: Hello, when I

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Matijn Woudt
On Thu, Mar 15, 2012 at 7:51 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 4:59 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 11:53 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Mar

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 7:51 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 4:59 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Matijn Woudt
On Thu, Mar 15, 2012 at 8:41 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 7:51 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 12:21 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Larry
On Thu, Mar 15, 2012 at 4:03 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 8:41 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 7:51 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at

Re: [PHP] Variables are empty only in fwrite

2012-03-15 Thread Stuart Dallas
On 15 Mar 2012, at 20:07, Larry wrote: On Thu, Mar 15, 2012 at 4:03 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 8:41 PM, Larry lrr...@gmail.com wrote: On Thu, Mar 15, 2012 at 2:57 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Mar 15, 2012 at 7:51 PM, Larry

[PHP] Variables not initialized. Is it possible to...

2009-05-18 Thread Cesco
Is it possible to set a parameter in PHP 5 to ask the interpreter to raise an error every time I try to use a variable that wasn't initialized before ? For example, I've write this piece of code in Python: print(DonaldDuck) I get this error: Traceback (most recent call last): File

Re: [PHP] Variables not initialized. Is it possible to...

2009-05-18 Thread Paul M Foster
On Mon, May 18, 2009 at 05:38:37PM +0200, Cesco wrote: Is it possible to set a parameter in PHP 5 to ask the interpreter to raise an error every time I try to use a variable that wasn't initialized before ? For example, I've write this piece of code in Python: print(DonaldDuck) I get

Re: [PHP] Variables not initialized. Is it possible to...

2009-05-18 Thread Bruno Fajardo
This kind of tip is raised in form of notices. So, to enable that, use the following function on top of your scripts: error_reporting(E_ALL | E_NOTICE); Best regards, Bruno. 2009/5/18 Paul M Foster pa...@quillandmouse.com On Mon, May 18, 2009 at 05:38:37PM +0200, Cesco wrote: Is it

Re: [PHP] Variables not initialized. Is it possible to...

2009-05-18 Thread Cesco
Thank you Il giorno 18/mag/09, alle ore 18:15, Bruno Fajardo ha scritto: This kind of tip is raised in form of notices. So, to enable that, use the following function on top of your scripts: error_reporting(E_ALL | E_NOTICE); Best regards, Bruno. -- PHP General Mailing List

Re: [PHP] Variables in forms

2008-06-23 Thread Jim Lucas
Ron Piggott wrote: I am writing a form right now. I would like to make the checkbox an array variable. The first part of the array is the component reference, the second part is the package reference. What name would you assign to it that I could use in processing the form in the PHP script

Re: [PHP] Variables in forms

2008-06-23 Thread Ron Piggott
Jim what you sent is very helpful. I had an error message when I submitted the form with a POST your_cleaning_function gave me this error: Fatal error: Call to undefined function: your_cleaning_function() I am trying to save the ones that were checked to a mySQL table and then notify the

Re: [PHP] Variables in forms

2008-06-23 Thread Nitsan Bin-Nun
Can you send us some of the code so we would be able to help you? On 23/06/2008, Ron Piggott [EMAIL PROTECTED] wrote: Jim what you sent is very helpful. I had an error message when I submitted the form with a POST your_cleaning_function gave me this error: Fatal error: Call to

Re: [PHP] Variables in forms

2008-06-23 Thread Thijs Lensselink
Quoting Ron Piggott [EMAIL PROTECTED]: Jim what you sent is very helpful. I had an error message when I submitted the form with a POST your_cleaning_function gave me this error: Fatal error: Call to undefined function: your_cleaning_function() I am trying to save the ones that were

Re: [PHP] Variables in forms

2008-06-23 Thread Daniel Brown
On Mon, Jun 23, 2008 at 6:24 AM, Ron Piggott [EMAIL PROTECTED] wrote: Fatal error: Call to undefined function: your_cleaning_function() This is the perfect example as to why NOT to copy-and-paste code from anywhere until you've checked it out yourself first. Jim placed the function

[PHP] Variables in forms

2008-06-22 Thread Ron Piggott
I am writing a form right now. I would like to make the checkbox an array variable. The first part of the array is the component reference, the second part is the package reference. What name would you assign to it that I could use in processing the form in the PHP script this posts to?

Re: [PHP] Variables

2008-06-19 Thread tedd
At 12:23 AM -0400 6/19/08, Robert Cummings wrote: ?php $GLOBALS['mysql_host'] = $_REQUEST['host']; ? I've intentionally used request since I don't know if you would do it via $_POST or $_GET. Additionally, one would hope you'd check/filter/process the submitted value before being so careless

[PHP] Variables

2008-06-18 Thread Byron
Hi I was wondering if this is the correct way to reference a variable from a file that has been included inside of a function. Also just general static/global variable usage. For example: Myqsql_functions.php ?php require(config.php) function ach_mysqlCon() {

Re: [PHP] Variables

2008-06-18 Thread Robert Cummings
On Thu, 2008-06-19 at 15:54 +1200, Byron wrote: Hi I was wondering if this is the correct way to reference a variable from a file that has been included inside of a function. Also just general static/global variable usage. For example: Myqsql_functions.php ?php

Re: [PHP] variables

2007-08-26 Thread Richard Lynch
On Mon, August 20, 2007 12:41 am, Augusto Morais wrote: Hi, I want create a variable based in another variable. Example: $foo (a simple variable); $myvar_foo Does it possible? variable variables will do it. But 99.% of the time, you're better off just using an array. -- Some

[PHP] variables

2007-08-19 Thread Augusto Morais
Hi, I want create a variable based in another variable. Example: $foo (a simple variable); $myvar_foo Does it possible? Thanks Augusto Morais -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] variables

2007-08-19 Thread Micky Hulse
Augusto Morais wrote: I want create a variable based in another variable. Example: Maybe this will give you some ideas?: http://us3.php.net/manual/en/language.variables.variable.php Good luck! Cheers, Micky -- Wishlists: http://snipurl.com/1gqpj Switch: http://browsehappy.com/ BCC?:

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread Richard Lynch
Surf directly to your CSS URL and see what happens. There are several possibiliies: #1. Your CSS has ?php ... ? in its output, because you have not convinced your web-server to run your CSS file through PHP to compute the dynamic result. You need something like this in .htacces: File

Re: [PHP] variables in CSS in PHP question/problems

2007-03-14 Thread tedd
something like this in .htacces: File whatever.css ForceType application/x-httpd-php /File whatever.css should be your CSS filename. To all: In addition to what Richard said: I came into this conversation late, so please forgive me if I'm not on track, but if one is trying to use php

[PHP] variables in CSS in PHP question/problems

2007-03-13 Thread Bruce Gilbert
I stumbled upon this article http://www.chrisjdavis.org/2005/10/16/php-in-css/ and was trying out variables with PGP, but can't get it to work. I wanted to have a variable image that changes on refresh, and also set the body color with PHP/CSS and maybe get that to change on refresh too. sp

Re: [PHP] PHP Variables sizes

2006-04-25 Thread Richard Lynch
On Sun, April 23, 2006 10:43 pm, David Killen wrote: Is there a maximum size for a variable in PHP. A client of mine is having problems working with a file of around 4Mb. Not really being a php developer I cannot really answer him. To quote him: We are not uploading excel from ftp. We are

RE: [PHP] PHP Variables sizes

2006-04-25 Thread Nicolas Verhaeghe
Nicolas Verhaeghe - White Echo Technologies Is there a maximum size for a variable in PHP. A client of mine is having problems working with a file of around 4Mb. Not really being a php developer I cannot really answer him. To quote him: We are not uploading excel from ftp. We are reading

[PHP] PHP Variables sizes

2006-04-23 Thread David Killen
Is there a maximum size for a variable in PHP. A client of mine is having problems working with a file of around 4Mb. Not really being a php developer I cannot really answer him. To quote him: We are not uploading excel from ftp. We are reading excel file which is about 4 MB. In php settings

Re: [PHP] PHP Variables sizes

2006-04-23 Thread chris smith
On 4/24/06, David Killen [EMAIL PROTECTED] wrote: Is there a maximum size for a variable in PHP. A client of mine is having problems working with a file of around 4Mb. Not really being a php developer I cannot really answer him. To quote him: We are not uploading excel from ftp. We are

[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
So I have found this code in http://bg.php.net/manual/en/ref.xmlrpc.php and it evaluates PHP but when I try to use the PIHandler separately. It doesnt work. So I ask if someone could help me to make parser1 return an array just like parser2. PARSER1 ?php $file = xmltest2.xml; function

[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
I comed up with this ?php $file = xmltest2.xml; $stack = array(); $foo3 = wddw; // start_element_handler ( resource parser, string name, array attribs ) function startElement($parser, $name, $attribs) { global $stack; $tag=array(name=$name,attrs=$attrs); array_push($stack,$tag); } //

[PHP] Parsing PHP variables in XML document

2006-02-26 Thread Ivan Nedialkov
Hi, I have the following problem. I want to import data into my site via PHP XML Parser, but I also want to include php string variables into the .xml file and when the xml file is parsed the variables are replaced whit the corresponding string. So far all my attempts have been unsuccessful.

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include $xml_file; $content = ob_end_flush(); and then parse the $content string. If you are doing this from within a function and you want access to global

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( Bogdan Ribic wrote: Hi Ivan, You might be able to use output buffering in conjunction with including your xml file. Something like: ob_start(); include

Re: [PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread chris smith
On 2/26/06, Bogdan Ribic [EMAIL PROTECTED] wrote: Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned OFF, which in most cases it won't be :( You can turn it off with a htaccess file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Ivan Nedialkov
Well isn't there a way instead of using only variables, to use sth like ?php echo $foo; ? I tried it but it doesnt work The parser returns blank! On Sun, 2006-02-26 at 12:02 +0100, Bogdan Ribic wrote: Hmmm, come to think of it, it would only work if short_open_tags ini directive is turned

[PHP] Re: Parsing PHP variables in XML document

2006-02-26 Thread Bogdan Ribic
Ivan, Did you try entering the code with debugger, or at least printing out what output buffer was holding, ie $content var in my example? Can you post exact code? Also, is short_tags turned on or off in php.ini? If it is on, php will get confused on first line of your xml file, it will

Re: [PHP] variables in PHP

2006-02-03 Thread Richard Lynch
Source code. On Fri, February 3, 2006 12:43 am, suresh kumar wrote: hi, In my project i assigned name of the text field as 'loginform'.but i got error msg like 'Undefined variable' then i changed the name as 'hiddenfield' but same error.any one having idea reply me.

[PHP] variables in PHP

2006-02-02 Thread suresh kumar
hi, In my project i assigned name of the text field as 'loginform'.but i got error msg like 'Undefined variable' then i changed the name as 'hiddenfield' but same error.any one having idea reply me. A.suresh

Re: [PHP] variables in PHP

2006-02-02 Thread Angelo Zanetti
suresh kumar wrote: hi, In my project i assigned name of the text field as 'loginform'.but i got error msg like 'Undefined variable' then i changed the name as 'hiddenfield' but same error.any one having idea reply me. POST the code so we can see exactly whats going on... -- PHP

Re: [PHP] Which is faster, a MySQL access, or a set of PHP variables?

2006-01-02 Thread Dave M G
Thank you for the advice. The point was raised, and it's a good one, that if I'm getting content from the database for most pages, then attaining the necessary translations probably won't make a difference. And of course, it is true that at my current levels of hits, the

Re: [PHP] Variables and Strings

2005-12-30 Thread Jochem Maas
Jim Moseby wrote: Thanks for the responses guys, but what i'm saying is i would ... I believe what Jochem is trying to tell you is that when you assign the string variable, the variable names are expanded to their values, so the names are no longer available. exactly - nicely put Jim.

[PHP] Which is faster, a MySQL access, or a set of PHP variables?

2005-12-30 Thread Dave M G
PHP General, I have a site where I will set the interface up to be multilingual. This means that all the snippets of text which make up the menu and other elements of navigation common to most pages will be stored as variables. In most web site set ups that I have seen,

RE: [PHP] Variables and Strings

2005-12-30 Thread Jay Blanchard
[snip] yeah 'Superman' explain what it is you want to do AND why - then maybe we can give you some help - what you are currently asking is impossible (well actually Jay Blanchard hinted at a way to do it but I firmly believe that its conceptually over your head atm and very probably not a good

Re: [PHP] Which is faster, a MySQL access, or a set of PHP variables?

2005-12-30 Thread Jochem Maas
Dave M G wrote: PHP General, I have a site where I will set the interface up to be multilingual. This means that all the snippets of text which make up the menu and other elements of navigation common to most pages will be stored as variables. In most web site set ups that I

Re: [PHP] Variables and Strings

2005-12-30 Thread Jochem Maas
Jay Blanchard wrote: [snip] yeah 'Superman' explain what it is you want to do AND why - then maybe we can give you some help - what you are currently asking is impossible (well actually Jay Blanchard hinted at a way to do it but I firmly believe that its conceptually over your head atm and very

RE: [PHP] Variables and Strings

2005-12-30 Thread Jay Blanchard
[snip] ah heck is that the same code that _we_ (Jay and me, etc) played with to find SQL queries? or something that was based on it? I remember Robin Vickery coming up with a token based variant which was rather nifty - must look into that agian sometime! [/snip] They are all variants of that.

Re: [PHP] Variables and Strings

2005-12-30 Thread John Nichel
Jay Blanchard wrote: [snip] yeah 'Superman' explain what it is you want to do AND why - then maybe we can give you some help - what you are currently asking is impossible (well actually Jay Blanchard hinted at a way to do it but I firmly believe that its conceptually over your head atm and very

RE: [PHP] Variables and Strings

2005-12-30 Thread Jay Blanchard
[snip] I wrote a doohickey once which searched for all variable searching doohickies. [/snip] I cannot tell you how happy I am to see you use the past perfect tense correctly there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Which is faster, a MySQL access, or a set of PHP variables?

2005-12-30 Thread Miles Thompson
At 10:32 AM 12/30/2005, Dave M G wrote: PHP General, I have a site where I will set the interface up to be multilingual. This means that all the snippets of text which make up the menu and other elements of navigation common to most pages will be stored as variables. In most

Re: [PHP] Variables and Strings

2005-12-30 Thread John Nichel
Jay Blanchard wrote: [snip] ah heck is that the same code that _we_ (Jay and me, etc) played with to find SQL queries? or something that was based on it? I remember Robin Vickery coming up with a token based variant which was rather nifty - must look into that agian sometime! [/snip] They are

RE: [PHP] Variables and Strings

2005-12-30 Thread Jay Blanchard
[snip] They are all variants of that. All nifty little tools. We should gather those up someplace...shouldn't we? Well, I just purchased some domains for that. Who wants to develop it? ;) phpdepository.com phpdepository.org phpdepository.net [/snip] I'll contribute... -- PHP General

Re: [PHP] Which is faster, a MySQL access, or a set of PHP variables?

2005-12-30 Thread Richard Lynch
On Fri, December 30, 2005 8:32 am, Dave M G wrote: I wondered if there was any downside to storing the list of interface texts in a MySQL database, then calling them as an array when the page loads? If you are already connecting to the database, then you are comparing an extra query or

Re: [PHP] Variables and Strings

2005-12-30 Thread Richard Lynch
On Thu, December 29, 2005 3:31 pm, PHP Superman wrote: Thanks for the responses guys, but what i'm saying is i would like to return all the variable names i have in a string, $String=Blah Blah Blah $VarName Blah Blah Blah; $VarName = 'xyz'; $String now has Blah Blah Blah xyz Blah Blah Blah in

Re: [PHP] Variables and Strings

2005-12-29 Thread Jochem Maas
PHP Superman wrote: Hey everyone, is there a way to return all the variables from a string into an array, for example $Var1=Yo; $Var2=Man; $SQL=SELECT * FROM tblname WHERE 4=$Var1 AND WHERE 3=$Var2; $AllVars=MySpecialFunction($SQL); your function MySpecialFunction() will recieve the following

Re: [PHP] Variables and Strings

2005-12-29 Thread PHP Superman
Thanks for the responses guys, but what i'm saying is i would like to return all the variable names i have in a string, $String=Blah Blah Blah $VarName Blah Blah Blah; $Vars=myspecialfunction($Varname); echo ($Vars); that code would produce $Varname, if there were more variables it would also

RE: [PHP] Variables and Strings

2005-12-29 Thread Jay Blanchard
[snip] Thanks for the responses guys, but what i'm saying is i would like to return all the variable names i have in a string, $String=Blah Blah Blah $VarName Blah Blah Blah; $Vars=myspecialfunction($Varname); echo ($Vars); that code would produce $Varname, if there were more variables it would

RE: [PHP] Variables and Strings

2005-12-29 Thread Jim Moseby
Thanks for the responses guys, but what i'm saying is i would like to return all the variable names i have in a string, $String=Blah Blah Blah $VarName Blah Blah Blah; $Vars=myspecialfunction($Varname); echo ($Vars); that code would produce $Varname, if there were more variables it

[PHP] Variables and Strings

2005-12-28 Thread PHP Superman
Hey everyone, is there a way to return all the variables from a string into an array, for example $Var1=Yo; $Var2=Man; $SQL=SELECT * FROM tblname WHERE 4=$Var1 AND WHERE 3=$Var2; $AllVars=MySpecialFunction($SQL); print_r($AllVars); would ideally print an array like: { array $Var1=Yo $Var2=Man }

Re: [PHP] Variables and Strings

2005-12-28 Thread Curt Zirzow
On Wed, Dec 28, 2005 at 10:30:04PM -0500, PHP Superman wrote: Hey everyone, is there a way to return all the variables from a string into an array, for example $Var1=Yo; $Var2=Man; $SQL=SELECT * FROM tblname WHERE 4=$Var1 AND WHERE 3=$Var2; $AllVars=MySpecialFunction($SQL);

[PHP] Variables in Variables?

2005-11-18 Thread Marquez Design
Greetings. Does anyone know how to do this? I have, $var $var2 In a field called two_vars in a MySQL db. I am calling the variables inside PHP document. In that document I am saying: $var = time $var2 = clock !-- I do the query in MySQL here -- echo $two_vars; But the what prints out is

[PHP] Variables in variables?

2005-11-18 Thread Marquez Design
This is a little more specific: I have a template in the database which looks something like this: html title$page_title/title body Image: $image p / img src = \$image\ Main Text: $mtext br / Text2: $text2 br / Text3: $text3 br / /body html The variable name is $somecontent When I call

[PHP] Variables not available

2005-09-12 Thread Dotan Cohen
I am running php 5.0.4 at home on my Fedora Core 4 box. Post and get variables are not available in my scripts. For instance, in file.php?foo=bar the variable $foo is empty. Same thing for variables passed in forms (get or post), which is how I came across this. What could cause this? How could I

Re: [PHP] Variables not available

2005-09-12 Thread Burhan Khalid
Dotan Cohen wrote: I am running php 5.0.4 at home on my Fedora Core 4 box. Post and get variables are not available in my scripts. For instance, in file.php?foo=bar the variable $foo is empty. Same thing for variables passed in forms (get or post), which is how I came across this. What could

Re: [PHP] Variables not available

2005-09-12 Thread Dotan Cohen
On 9/12/05, Burhan Khalid [EMAIL PROTECTED] wrote: Dotan Cohen wrote: I am running php 5.0.4 at home on my Fedora Core 4 box. Post and get variables are not available in my scripts. For instance, in file.php?foo=bar the variable $foo is empty. Same thing for variables passed in forms (get

Re: [PHP] Variables not available

2005-09-12 Thread Ryan A
On 9/12/2005 9:00:46 AM, Dotan Cohen ([EMAIL PROTECTED]) wrote: I am running php 5.0.4 at home on my Fedora Core 4 box. Post and get variables are not available in my scripts. For instance, in file.php?foo=bar the variable $foo is empty. Same thing for variables passed in forms (get or post),

Re: [PHP] Variables not available

2005-09-12 Thread Dotan Cohen
On 9/12/05, Ryan A [EMAIL PROTECTED] wrote: On 9/12/2005 9:00:46 AM, Dotan Cohen ([EMAIL PROTECTED]) wrote: I am running php 5.0.4 at home on my Fedora Core 4 box. Post and get variables are not available in my scripts. For instance, in file.php?foo=bar the variable $foo is empty. Same

Re: [PHP] Re: How to read PHP variables.

2005-07-15 Thread Bruno B B Magalhães
Hi everybody, well I don´t want to include and use those variables or set then. I want to read the file, parse the vars to a form, so the user can change the system configs using the web instead of FTP... I am thinking reading using a simple include, and then clean the file contents and

Re: [PHP] Re: How to read PHP variables.

2005-07-15 Thread Edward Vermillion
Bruno B B Magalhães wrote: Hi everybody, well I don´t want to include and use those variables or set then. I want to read the file, parse the vars to a form, so the user can change the system configs using the web instead of FTP... I am thinking reading using a simple include, and then

Re: [PHP] Re: How to read PHP variables.

2005-07-15 Thread André Medeiros
What about... form action=saveConfig.php method=post Database Host: input type=text name=config[database][host] value=?=$config['database']['host']? /br / Database User: input type=text name=config[database][user] value=?=$config['database']['user']? /br / !-- some more fields here -- /form

Re: [PHP] How to read PHP variables.

2005-07-14 Thread Rory Browne
Thsi is way, way WAY too vague. What exactly do you need a patern for? If you simply want to change it, then just do a $var['whatever'] = value; again in the module you want to change it in. If you want to redo the config file, then you can just loop through the array, printing out, each value

[PHP] Re: How to read PHP variables.

2005-07-13 Thread Jasper Bryant-Greene
Bruno B B Magalhães wrote: That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; If you trust the config file: ?php eval(file_get_contents('/path/to/config.file')); ? Jasper -- PHP General Mailing List (http://www.php.net/) To

[PHP] How to read PHP variables.

2005-07-12 Thread Bruno B B Magalhães
Hi you all! That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... Thanks in advance... Best Regards, Bruno B B

RE: [PHP] How to read PHP variables.

2005-07-12 Thread yanghshiqi
-Original Message- From: Bruno B B Magalhães [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 8:21 PM To: php-general@lists.php.net Subject: [PHP] How to read PHP variables. Hi you all! That's my problem: I have a configuration files with the following structure... $vars['varname

Re: [PHP] How to read PHP variables.

2005-07-12 Thread Ahmed Saad
Hi Bruno, On 7/12/05, Bruno B B Magalhães [EMAIL PROTECTED] wrote: Hi you all! $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... i think you mean an API to help you manage and persist your

Re: [PHP] Variables in stored txt

2005-06-01 Thread Richard Lynch
On Tue, May 31, 2005 12:18 pm, Niels Riis Kristensen said: Hi. I have a problem that consist of a desire to use preformatted text in a while-loop while inserting data from another search. The code is as follows: $get_var1 = mysql_query(SELECT * FROM table1 WHERE id LIKE

[PHP] Variables in stored txt

2005-05-31 Thread Niels Riis Kristensen
Hi. I have a problem that consist of a desire to use preformatted text in a while-loop while inserting data from another search. The code is as follows: $get_var1 = mysql_query(SELECT * FROM table1 WHERE id LIKE '1' LIMIT 1);

RE: [PHP] Variables in stored txt

2005-05-31 Thread Jay Blanchard
Quite sending this over and over.it is taking a while for the e-mail to get to the list -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables in stored txt

2005-05-31 Thread Niels Riis Kristensen
operator, when you really should be using the = operator isn't efficient either. Original Message Date: Tuesday, May 31, 2005 09:18:42 PM +0200 From: Niels Riis Kristensen [EMAIL PROTECTED] To: php-general@lists.php.net Cc: Subject: [PHP] Variables in stored txt Hi. I

[PHP] PHP variables on SSL and IE5.x

2004-12-28 Thread Merlin
Hi there, I am having trouble with posting a form to a php script through SSL on IE prior 5.5 sp1. It works like a charm on all other browsers. In IE it works without SSL, but when SSL is enabled, the browser pops up with a message that he is switching to an unsecure site and then all then

[PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
I am trying to run a shell command with backticks. However, I get a parse error. Is it because I have an array variable in there? $result = `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first'] $user['name_last']`; Do I need to assign the value to a regular variable before I put

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Sebastian
well $user['password'] has no double quotes around it. - Original Message - From: Jonathan Duncan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 11, 2004 8:09 PM Subject: [PHP] php variables in a backtick command I am trying to run a shell command with backticks

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
Ah, that is a good idea, putting the command in a variable and then executing the variable. I have doen that before but did not think of it now. Too many things going on. Thanks! Jonathan Rory Browne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm not sure about variable

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
Duncan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 11, 2004 8:09 PM Subject: [PHP] php variables in a backtick command I am trying to run a shell command with backticks. However, I get a parse error. Is it because I have an array variable in there? $result

[PHP] Re: php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
So I tried it that way and it worked, that is annoying though, having to add extra lines to the code and assign the contents of one variable to another. Any way around this? Jonathan Jonathan Duncan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am trying to run a shell command

Re: [PHP] php variables in a backtick command

2004-12-11 Thread Rory Browne
I'm not sure about variable expansion with backticks(I don't use backticks, if necessary I use shell_exec() instead). I'm just after installing a fresh SuSE 9.1, and php is giving me a segfault at the minute, with that particular code, but if you were using double quotes you could: $command =

[PHP] Variables from database

2004-12-05 Thread Stuart Felenstein
I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is probably a stupid question.

Re: [PHP] Variables from database

2004-12-05 Thread Marek Kilimajer
Stuart Felenstein wrote: I haven't try this yet but wondering if it's possible. Can I do something like this: select fieldone from table ; $myvar = $fieldone ? And more so could I do it with a where clause ? i.e. select fieldone from table where fieldone = 3 $myvar = $fieldone ? This is

  1   2   3   4   5   >