[PHP] application level variable file

2013-03-22 Thread inungh
I am very new to the PHP application and would like to create a new project. I would like to have a file to save my application level variable and functions. I would like to know does PHP have any default file name and file path for this file like Web.config file for ASP.Net and Application.cfm

Re: [PHP] application level variable file

2013-03-22 Thread Daniel Brown
On Fri, Mar 22, 2013 at 10:22 AM, inu...@gmail.com wrote: I am very new to the PHP application and would like to create a new project. I would like to have a file to save my application level variable and functions. I would like to know does PHP have any default file name and file path for

Re: [PHP] application level variable file

2013-03-22 Thread Sebastian Krebs
2013/3/22 inu...@gmail.com I am very new to the PHP application and would like to create a new project. I would like to have a file to save my application level variable and functions. I would like to know does PHP have any default file name and file path for this file like Web.config file

Re: [PHP] application level variable file

2013-03-22 Thread Stuart Dallas
On 22 Mar 2013, at 14:22, inu...@gmail.com wrote: I am very new to the PHP application and would like to create a new project. I would like to have a file to save my application level variable and functions. I would like to know does PHP have any default file name and file path for this

Re: [PHP] application level variable file

2013-03-22 Thread David OBrien
On Fri, Mar 22, 2013 at 10:26 AM, Stuart Dallas stu...@3ft9.com wrote: On 22 Mar 2013, at 14:22, inu...@gmail.com wrote: I am very new to the PHP application and would like to create a new project. I would like to have a file to save my application level variable and functions. I

Re: [PHP] Reading class variable value always returns NULL

2012-08-15 Thread Reto Kaiser
So here's some new observations on the instance variables being NULL. As far as we found out this is the sequence of events: 1. Apache (MPM) received request A which executes a php script. 2. Within this script during the unserialization of an object an exception is thrown. 3. This exception is

Re: [PHP] Reading class variable value always returns NULL

2012-08-15 Thread Philipp Gysin
As a little clarification: The Apache server in question is configured as a MPM prefork. On Wed, Aug 15, 2012 at 4:28 PM, Reto Kaiser r...@cargomedia.ch wrote: So here's some new observations on the instance variables being NULL. As far as we found out this is the sequence of events: 1.

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Reto Kaiser
Hi, Thanks for your input Robert and Volmar! I have googled again with instance variable instead of class variable - but have not found any similar reports. I'm pretty sure those are the same objects. The application usually runs alright. We only see the instance variables becoming NULL since

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Reto Kaiser
Hi, We have since deployed another webserver machine and observe the exact same behavior there. So it is not a hardware problem. We have also disabled various php modules, but this didn't help either. Any debug suggestions are welcome! :) Reto On Tue, Aug 14, 2012 at 10:40 AM, Reto Kaiser

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Robert Williams
I'm not real clear on what's happening. Are you saying that if you assign values to the protected class members, and then immediately read them, that they're null? So, there's code something like this: class Foo { public function Something() { $this-foo = 1; //shows null instead

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Jim Lucas
On 08/12/2012 05:32 AM, Reto Kaiser wrote: Hi, So I have this strange situation where I assign a classvariable a value, but when I read the value it is NULL. Does anyone have an idea what could cause this, or how to further debug? Thanks, Reto What is your error reporting set to? Do you

Re: [PHP] Reading class variable value always returns NULL

2012-08-14 Thread Reto Kaiser
Hey, We have: error_reporting((E_ALL | E_STRICT) ~(E_NOTICE | E_USER_NOTICE)); Displaying errors is disabled: display_errors = Off We have a custom error handler which logs all errors to a file. In this file we receive byeffect errors, like that the second argument to array_key_exists should

Re: [PHP] Reading class variable value always returns NULL

2012-08-13 Thread Robert Cummings
On 12-08-12 08:32 AM, Reto Kaiser wrote: Hi, So I have this strange situation where I assign a classvariable a value, but when I read the value it is NULL. The class has one variable declared: = class A { private $_cookies; } = That is a private instance variable NOT

Re: [PHP] Reading class variable value always returns NULL

2012-08-13 Thread Volmar Machado
It's only a hint, but You start checking if the Object Ids are the same or not. 2012/8/13 Robert Cummings rob...@interjinn.com: On 12-08-12 08:32 AM, Reto Kaiser wrote: Hi, So I have this strange situation where I assign a classvariable a value, but when I read the value it is NULL. The

[PHP] Reading class variable value always returns NULL

2012-08-12 Thread Reto Kaiser
Hi, So I have this strange situation where I assign a classvariable a value, but when I read the value it is NULL. The class has one variable declared: = class A { private $_cookies; } = In a method of this class I assign this classvariable plus an undeclared

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-08 Thread ioan...@btinternet.com
There are essentially 2 ways: 1. All POSTed data is present in the $_POST superglobal array. So you could just loop over that, ignore the fields you already knew were there, and the data remaining is then essentially the data you seek. The keys in the $_POST array are the fieldnames you are

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-06 Thread Maciek Sokolewicz
more boxes as per user require. Hi All, I am a basic user of PHP and I have need of reading the dynamic HTML form field as a variable in PHP so it will be great if someone can share some good link or snip for quick understanding. Thanks, Devang http://lmgtfy.com/?q=how+to+pass+and+receive

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-06 Thread Jim Giner
know how to pass variable but having difficulties when I use the dynamic form field in HTML that add more boxes as per user require. Hi All, I am a basic user of PHP and I have need of reading the dynamic HTML form field as a variable in PHP so it will be great if someone can share some

[PHP] Read dynamic variable from HTML form into PHP

2012-06-05 Thread Devang Patel
Hi All, I am a basic user of PHP and I have need of reading the dynamic HTML form field as a variable in PHP so it will be great if someone can share some good link or snip for quick understanding. Thanks, Devang

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-05 Thread Govinda
Hi All, I am a basic user of PHP and I have need of reading the dynamic HTML form field as a variable in PHP so it will be great if someone can share some good link or snip for quick understanding. Thanks, Devang http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable When just

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-05 Thread Govinda
in PHP so it will be great if someone can share some good link or snip for quick understanding. Thanks, Devang http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable When just starting out, Google is your friend. Or did I misunderstand your question? -Govinda Devang, Please

Re: [PHP] Read dynamic variable from HTML form into PHP

2012-06-05 Thread Jim Giner
. Hi All, I am a basic user of PHP and I have need of reading the dynamic HTML form field as a variable in PHP so it will be great if someone can share some good link or snip for quick understanding. Thanks, Devang http://lmgtfy.com/?q=how+to+pass+and+receive+a+PHP+variable When just

Re: [PHP] Error in variable assignment

2011-04-12 Thread Richard Quadling
On 11 April 2011 20:28, Ethan Rosenberg eth...@earthlink.net wrote: Dear list - I an writing a script that will simulate a chess board.  On a move from e2 to e6 [see below] the variable in e2 is never assigned to e6.  Here are some code snippets: ?php session_start(); session_name(Chess);

[PHP] Error in variable assignment

2011-04-11 Thread Ethan Rosenberg
Dear list - I an writing a script that will simulate a chess board. On a move from e2 to e6 [see below] the variable in e2 is never assigned to e6. Here are some code snippets: ?php session_start(); session_name(Chess); error_reporting(1); if ($_SESSION['flag'] != 1) { $flag = 1; echo br

[PHP] Re: session variable problem

2011-04-01 Thread markb
On 3/25/2011 12:09 PM, markb wrote: Very rusty with PHP. We moved our web site to a new hosting service (godaddy). PHP changed from 4x to 5.2.17. I can no longer change $_SESSION variables after the first use. First call to form - start session create variables Second call - can read variables,

[PHP] Re: session variable problem

2011-03-31 Thread markb
On 3/25/2011 12:09 PM, markb wrote: Very rusty with PHP. We moved our web site to a new hosting service (godaddy). PHP changed from 4x to 5.2.17. I can no longer change $_SESSION variables after the first use. First call to form - start session create variables Second call - can read variables,

[PHP] Re: session variable problem

2011-03-29 Thread markb
On 3/25/2011 12:09 PM, markb wrote: Very rusty with PHP. We moved our web site to a new hosting service (godaddy). PHP changed from 4x to 5.2.17. I can no longer change $_SESSION variables after the first use. First call to form - start session create variables Second call - can read variables,

[PHP] Re: $_POST variable

2011-03-11 Thread Geoff Lane
Hi Danny, On Friday, March 11, 2011, 7:28:10 PM, you wrote: I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print

[PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio name=?php print (radio_.$result_from_mysql) ; ?

Re: [PHP] Re: $_POST variable

2011-03-11 Thread richard gray
You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2; } } I haven't tried the above code, but I hope

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Jim Lucas
On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of the radio buttons: input type=radio

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Shawn McKenzie
On 03/11/2011 02:33 PM, Jim Lucas wrote: On 3/11/2011 12:03 PM, Shawn McKenzie wrote: On 03/11/2011 01:28 PM, Danny wrote: Hi guys, I have a form that has a long list of radio-bottons inside of it. The radio-buttons are dynamically created via php and MySQL. Here is an example of one of

Re: [PHP] Re: $_POST variable

2011-03-11 Thread Kirk Bailey
On 3/11/2011 2:43 PM, Geoff Lane wrote: [snip] You could use foreach to iterate through the post variables until you encounter a match: foreach ($_POST as $key = $value){ if (substr($key, 0, 6) == radio_) { $buttonName = $key; $buttonValue = 4value; break 2;

[PHP] Singleton with variable parameters

2010-12-15 Thread Sebastian Detert
Hi guys, I am trying to generate an abstract Singleton class for use in arbitrary classes, like class Foo extends Singleton {} and generate a new class with Foo - getInstance(); How can I manage to use this with an unkown number of parameters like Foo - getInstance('a', 'b'); ? Something

Re: [PHP] Singleton with variable parameters

2010-12-15 Thread Nathan Nobbe
On Wed, Dec 15, 2010 at 2:11 PM, Sebastian Detert php-maill...@elygor.dewrote: Hi guys, I am trying to generate an abstract Singleton class for use in arbitrary classes, like class Foo extends Singleton {} and generate a new class with Foo - getInstance(); Until traits release I think

RE: [PHP] Singleton with variable parameters

2010-12-15 Thread Tommy Pham
-Original Message- From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Wednesday, December 15, 2010 1:31 PM To: Sebastian Detert Cc: php-general@lists.php.net Subject: Re: [PHP] Singleton with variable parameters On Wed, Dec 15, 2010 at 2:11 PM, Sebastian Detert php- maill

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Adam Richardson
foreach ($_POST as $key=$post) { $post=str_replace( , +, $post); $url.=$key.=.$post.; } Hi Bob, One thing I see is that you're appending values on to the end of a url that already has 2 values, so you should place the at the beginning of your line instead of at the

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Daniel Molina Wegener
On Wednesday 24 November 2010, Bob Keightley bob.keight...@virgin.net wrote: I already have a curl script that gets the web page, but it doesn't pass the parameters Hello Bob, Being new to PHP I haven't the first idea how to modify it so that it does. Script is as follows: $url =

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Bob Keightley
Guess I've not explained this very well. The external page I am fetching using another curl script has asp query hyperlinks in it. I do not know the variable names in each query or the values they have. All I want to do is replace the external url referenced in those links with a url which is

RE: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Tommy Pham
-Original Message- From: Bob Keightley [mailto:bob.keight...@virgin.net] Sent: Wednesday, November 24, 2010 11:25 AM To: php-general@lists.php.net Subject: Re: [PHP] curl and variable parameters in hyperlink Guess I've not explained this very well. The external page I am

RE: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Bob Keightley
Thanks to all for your interest so far but as I said, new to PHP. Changed POST to GET and all now working fine! Tommy, the third party site is fully aware of what I am doing. We pay them to use the data, as do lots of other companies in our industry. Supplying data is what they do. We could

[PHP] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley
First use of Curl so probably a very simple problem - I have a script which loads a third party web page into my site. That page contains links which have variable parameters i.e. www.blahblah.asp?param1=xxxparam2=yyy. Any clues as to what I need to do to pass these parameters in a curl script

RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread admin
:12 PM To: php-general@lists.php.net Subject: [PHP] curl and variable parameters in hyperlink First use of Curl so probably a very simple problem - I have a script which loads a third party web page into my site. That page contains links which have variable parameters i.e. www.blahblah.asp

RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley
I already have a curl script that gets the web page, but it doesn't pass the parameters Being new to PHP I haven't the first idea how to modify it so that it does. Script is as follows: $url = http://www.xx.com/query.asp?param1=val1param2=val2;; foreach ($_POST as $key=$post) {

Re: [PHP] Help with variable variables not being set for a multi-dimensional array

2010-11-10 Thread David Harkness
or other non-variable syntax elements such as - or ::. eval() can do this because it parses the code as PHP. Variable variables take the *variable name* contained in the variable and look it up in the current scope. This is a variable name: ini_array This is not: ini_array['agis_core

Re: [PHP] Variable in variable.

2010-08-26 Thread Robert Cummings
On 10-08-26 09:54 AM, João Cândido de Souza Neto wrote: I know that in PHP I can use this: $var1 = text; $var2 = '$var1'; 4cho $$var2; So it gives me text. It would if you didn't have typos and the wrong quotes in the above :) My question is, is there a way of doing it with constant like

Re: [PHP] Variable in variable.

2010-08-26 Thread Jo�o C�ndido de Souza Neto
Really cool... Thanks and fogive me by my mistake. hehe -- João Cândido de Souza Neto Robert Cummings rob...@interjinn.com escreveu na mensagem news:4c76743a.2060...@interjinn.com... On 10-08-26 09:54 AM, João Cândido de Souza Neto wrote: I know that in PHP I can use this: $var1 = text;

[PHP] constant from variable

2010-06-04 Thread Tanel Tammik
Hi, define('MYCONST', 'something'); $my = 'my'; $const = 'const'; is it possible to get the value of MYCONST using variables $my and $const_ Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] constant from variable

2010-06-04 Thread Adam Petrone
Use the constant() function: echo constant( $my . $const ); http://www.php.net/manual/en/function.constant.php -Original Message- From: Tanel Tammik [mailto:keevit...@gmail.com] Sent: Friday, June 04, 2010 3:08 PM To: php-general@lists.php.net Subject: [PHP] constant from variable Hi

Re: [PHP] constant from variable

2010-06-04 Thread Ashley Sheridan
On Fri, 2010-06-04 at 22:07 +0300, Tanel Tammik wrote: Hi, define('MYCONST', 'something'); $my = 'my'; $const = 'const'; is it possible to get the value of MYCONST using variables $my and $const_ Br Tanel I don't really see how you can? The only correlation at all is

[PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the set variables are lost when I forward the user to members

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ashley Sheridan
On Wed, 2009-09-09 at 10:36 -0500, Shawn McKenzie wrote: Sumit Sharma wrote: Hi, I have developed a listing site which is totally class based. Now when it authenticates a user login and set appropriate class variables to true and set user info in user class variables, value of all the

Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Sumit Sharma
-- From: Ashley Sheridan a...@ashleysheridan.co.uk Date: Wed, Sep 9, 2009 at 9:14 PM Subject: Re: [PHP] Re: Class variable value lost To: Shawn McKenzie nos...@mckenzies.net Cc: Sumit Sharma sumitp...@gmail.com, PHP General Mailing List php-general@lists.php.net On Wed, 2009-09-09 at 10:36 -0500, Shawn

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Andrew Ballard
On Wed, Sep 9, 2009 at 11:58 AM, Sumit Sharma sumitp...@gmail.com wrote: What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Martin Scotta
issue than setting $_SESSION variables. -- Forwarded message -- From: Ashley Sheridan a...@ashleysheridan.co.uk Date: Wed, Sep 9, 2009 at 9:14 PM Subject: Re: [PHP] Re: Class variable value lost To: Shawn McKenzie nos...@mckenzies.net Cc: Sumit Sharma sumitp...@gmail.com, PHP

Re: Fwd: [PHP] Re: Class variable value lost

2009-09-09 Thread Shawn McKenzie
Sumit Sharma wrote: What I have done is declared one User class in a separate file and created its object there only. After this included this file in all other file which are using its object. So the object is creating only once and included in every other file only once. Now when I over

Re: [PHP] Re: Class variable value lost

2009-09-09 Thread Ben Dunlap
The object only exists for that instance of the script, so when the user navigates to the next page, the object is freed up from the memory. There are a couple of ways you could get round this:      * don't navigate away from the page, and use AJAX calls to update        parts of the page

[PHP] Re: accessing variable from inside a class

2009-09-04 Thread Shawn McKenzie
Lars Nielsen wrote: Hi, How do i access a variable from inside a class? ex. I want to use $template_dir inside Template. $template_dir = 'templates/'; class templateParser { var $output; function templateParser($templateFile='default_template.htm') {

[PHP] check a variable after EACH function

2009-06-30 Thread Flint Million
This might seem silly but here's what I'm trying to do Suppose I have some kind of check variable - say for example $abort_now. Or it could be a function. Something to be evaluated to a value. I want to execute a block of statements, but after EACH statement executes, check the value of

Re: [PHP] check a variable after EACH function

2009-06-30 Thread Paul M Foster
On Tue, Jun 30, 2009 at 06:31:54PM -0500, Flint Million wrote: This might seem silly but here's what I'm trying to do Suppose I have some kind of check variable - say for example $abort_now. Or it could be a function. Something to be evaluated to a value. I want to execute a block of

Re: [PHP] check a variable after EACH function

2009-06-30 Thread Phpster
On Jun 30, 2009, at 10:48 PM, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Jun 30, 2009 at 06:31:54PM -0500, Flint Million wrote: This might seem silly but here's what I'm trying to do Suppose I have some kind of check variable - say for example $abort_now. Or it could be a

Re: [PHP] check a variable after EACH function

2009-06-30 Thread Paul M Foster
On Tue, Jun 30, 2009 at 11:21:03PM -0400, Phpster wrote: On Jun 30, 2009, at 10:48 PM, Paul M Foster pa...@quillandmouse.com wrote: snip FWIW, I've had to do this exact thing with regard to form validation, except I'm not looping. Check each condition, and if it fails, never mind

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Terion Miller
Hi Guys! Well I tried the INNER JOIN and still can not get it to echo the AdminID so I know it isn't working, (what kind of things should I think about that could make it not work) so far the only query that did work and return the AdminID was my original I believe it was referred to as hosed

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Shawn McKenzie
Terion Miller wrote: Hi Guys! Well I tried the INNER JOIN and still can not get it to echo the AdminID so I know it isn't working, (what kind of things should I think about that could make it not work) so far the only query that did work and return the AdminID was my original I believe it

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Terion Miller
Hi Again Here is the query and code I tried: $sql = SELECT * FROM workorders WHERE AdminID = (SELECT AdminID FROM admin WHERE UserName = ' . mysql_real_escape_string($_SESSION['user']) . '); $result2 = mysql_query ($sql); $row2 = mysql_fetch_assoc ($result2); $printrow =

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Shawn McKenzie
Terion Miller wrote: Hi Again Here is the query and code I tried: $sql = SELECT * FROM workorders WHERE AdminID = (SELECT AdminID FROM admin WHERE UserName = ' . mysql_real_escape_string($_SESSION['user']) . '); $result2 = mysql_query ($sql); $row2 = mysql_fetch_assoc

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Terion Miller
Well upon looking it was number 2, I had no orders in the workorder table, but here is an oddity I wonder if someone can explain if I run this simple query: $query = SELECT * FROM admin, workorders WHERE admin.UserName = '.$_SESSION['user'].' ; It returns adminID = 7 (my number is

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Shawn McKenzie
Terion Miller wrote: Well upon looking it was number 2, I had no orders in the workorder table, but here is an oddity I wonder if someone can explain if I run this simple query: $query = SELECT * FROM admin, workorders WHERE admin.UserName = '.$_SESSION['user'].' ; It returns

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-29 Thread Shawn McKenzie
Shawn McKenzie wrote: Terion Miller wrote: Well upon looking it was number 2, I had no orders in the workorder table, but here is an oddity I wonder if someone can explain if I run this simple query: $query = SELECT * FROM admin, workorders WHERE admin.UserName =

[PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Terion Miller
Not sure if I'm wording this right, what I am trying to do is look in two tables, match the ID to use to pull information Here's my code but it's not right, although it is picking up the user from the session, I will also post what my variable debugging lists: $query = SELECT

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Andrew Ballard
On Wed, Jan 28, 2009 at 3:18 PM, Terion Miller webdev.ter...@gmail.com wrote: Not sure if I'm wording this right, what I am trying to do is look in two tables, match the ID to use to pull information Here's my code but it's not right, although it is picking up the user from the session, I

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Terion Miller
Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just not using it right now that I have it...lol On Wed, Jan 28, 2009 at 2:26 PM, Andrew Ballard aball...@gmail.com wrote: On Wed,

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Christoph Boget
Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just not using it right now that I have it...lol Because there is ambiguity w/r/t the columns you are selecting, you'll need to use

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Terion Miller
I just read it 3 times and I don't understand it. On Wed, Jan 28, 2009 at 3:22 PM, Christoph Boget christoph.bo...@gmail.comwrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Andrew Ballard
On Wed, Jan 28, 2009 at 4:22 PM, Christoph Boget christoph.bo...@gmail.com wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just not using it right now that I have it...lol

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Andrew Ballard
On Wed, Jan 28, 2009 at 4:31 PM, Terion Miller webdev.ter...@gmail.com wrote: On Wed, Jan 28, 2009 at 3:22 PM, Christoph Boget christoph.bo...@gmail.com wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Shawn McKenzie
Terion Miller wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just not using it right now that I have it...lol On Wed, Jan 28, 2009 at 2:26 PM, Andrew Ballard

Re: [PHP] Making a Variable from different tables with Matching Db fields?

2009-01-28 Thread Christoph Boget
Because there is ambiguity w/r/t the columns you are selecting, you'll need to use aliases. http://dev.mysql.com/doc/refman/5.1/en/identifiers.html In your code, when you are referencing the column, do so using the alias. That should solve your problem. I just read it 3 times and I

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Shawn McKenzie
Shawn McKenzie wrote: Terion Miller wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just not using it right now that I have it...lol On Wed, Jan 28, 2009 at 2:26 PM,

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Terion Miller
On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.netwrote: Shawn McKenzie wrote: Terion Miller wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I think I'm just

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Shawn McKenzie
Terion Miller wrote: On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.netwrote: Shawn McKenzie wrote: Terion Miller wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to pull workorders with that AdminID . I couldn't get your block to work Andrew :( I

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Terion Miller
On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie nos...@mckenzies.netwrote: Terion Miller wrote: On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.net wrote: Shawn McKenzie wrote: Terion Miller wrote: Well I'm stuck I have the AdminID but now I can't seem to use it to

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Terion Miller
On Wed, Jan 28, 2009 at 4:12 PM, Terion Miller webdev.ter...@gmail.comwrote: On Wed, Jan 28, 2009 at 4:00 PM, Shawn McKenzie nos...@mckenzies.netwrote: Terion Miller wrote: On Wed, Jan 28, 2009 at 3:43 PM, Shawn McKenzie nos...@mckenzies.net wrote: Shawn McKenzie wrote: Terion

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Shawn McKenzie
Here are my variables when I reveal them, I am picking up the right adminID I can't figure out why it's returning random orders though: $querySELECT admin.AdminID, workorders.AdminID FROM admin, workorders WHERE admin.UserName = 'tmiller' $result Resource id #5 $row key

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Chris
Here are my variables when I reveal them, I am picking up the right adminID I can't figure out why it's returning random orders though: $querySELECT admin.AdminID, workorders.AdminID FROM admin, workorders WHERE admin.UserName = 'tmiller' Please please please trim your posts to relevant

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Terion Miller
I'm not sure what you mean by trim the posts, please explain so I can spare folks from redundant text. Your post made perfect sense to me about the INNER JOIN , I looked it up but it is not returning the AdminID, maybe my syntax is wrong? $query = SELECT admin.AdminID , workorders.AdminID

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Chris
Terion Miller wrote: I'm not sure what you mean by trim the posts, please explain so I can spare folks from redundant text. Before you post, remove any text that you're not referencing (in this case I removed my suggestion). Your post made perfect sense to me about the INNER JOIN , I

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Terion Miller
Your post made perfect sense to me about the INNER JOIN , I looked it up but it is not returning the AdminID, maybe my syntax is wrong? $query = SELECT admin.AdminID , workorders.AdminID FROM admin INNER JOIN workorders ON AdminID(admin,

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Chris
Well I tried both ways and still cannot get it to pick up the AdminID, $query SELECT admin.AdminID , workorders.AdminID FROM admin INNER JOIN workorders on AdminID WHERE admin.UserName = 'tmiller' $result $row $SortBy WorkOrderID DESC $Page 1 $PerPage30 $StartPage 0 $sql

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Shawn McKenzie
Terion Miller wrote: Your post made perfect sense to me about the INNER JOIN , I looked it up but it is not returning the AdminID, maybe my syntax is wrong? $query = SELECT admin.AdminID , workorders.AdminID FROM admin

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Chris
The main problem is that you've never explained what you want to get from the query. The replies have used your code as an example and I'm pretty sure that's not what you want. Unless I totally mis-understand what you want, you have 2 options: 1. Use the 2 queries that I gave you in a

Re: [PHP] Making a Variable from different tables with Matching Dbfields?

2009-01-28 Thread Shawn McKenzie
Chris wrote: The main problem is that you've never explained what you want to get from the query. The replies have used your code as an example and I'm pretty sure that's not what you want. Unless I totally mis-understand what you want, you have 2 options: 1. Use the 2 queries that I

[PHP] Remote File Variable Injection Safety?

2009-01-07 Thread Daniel Kolbo
Hello, suppose there is a file at http://otherhost.com/remote.php that looks like this: ?php if (!isset($safe_flag)) { die(hacking attempt); } echo You are in; ? Suppose i executed the following php file at http://myhost.com/local.php ?php require_once(http://otherhost.com/remote.php;);

Re: [PHP] Remote File Variable Injection Safety?

2009-01-07 Thread Stuart
2009/1/7 Daniel Kolbo kolb0...@umn.edu: suppose there is a file at http://otherhost.com/remote.php that looks like this: ?php if (!isset($safe_flag)) { die(hacking attempt); } echo You are in; ? Suppose i executed the following php file at http://myhost.com/local.php ?php

Re: [PHP] Remote File Variable Injection Safety?

2009-01-07 Thread ceo
If register_globals is on (ewww!) at otherhost.com, then ?safe_flag on the URL will get in. This is one of the reasons why register_globals should be OFF. NOTE: The code you gave does not describe the circumstances whereby $safe_flag is set. There could be all manner of other issues

Re: [PHP] Remote File Variable Injection Safety?

2009-01-07 Thread Daniel Kolbo
c...@l-i-e.com wrote: If register_globals is on (ewww!) at otherhost.com, then ?safe_flag on the URL will get in. This is one of the reasons why register_globals should be OFF. NOTE: The code you gave does not describe the circumstances whereby $safe_flag is set. There could be all manner

[PHP] Passing a variable which is an aggregate function

2008-10-10 Thread The Doctor
What I am trying to do is to pass an aggregate variable which is the sum of some smaller variable. This var also need to finish in the form of $.YY . Pointers please. -- Member - Liberal International This is [EMAIL PROTECTED] Ici [EMAIL PROTECTED] God, Queen and country! Beware

Re: [PHP] Passing a variable which is an aggregate function

2008-10-10 Thread Jim Lucas
The Doctor wrote: What I am trying to do is to pass an aggregate variable which is the sum of some smaller variable. This var also need to finish in the form of $.YY . Pointers please. Most of the above can be done using number_format(). The dollar sign you will have to add

Re: [PHP] Passing a variable which is an aggregate function

2008-10-10 Thread Andrew Ballard
On Fri, Oct 10, 2008 at 1:33 PM, The Doctor [EMAIL PROTECTED] wrote: What I am trying to do is to pass an aggregate variable which is the sum of some smaller variable. This var also need to finish in the form of $.YY . Pointers please. Would you care to explain a little further what

Re: [PHP] Passing a variable which is an aggregate function

2008-10-10 Thread The Doctor
On Fri, Oct 10, 2008 at 01:48:01PM -0400, Andrew Ballard wrote: On Fri, Oct 10, 2008 at 1:33 PM, The Doctor [EMAIL PROTECTED] wrote: What I am trying to do is to pass an aggregate variable which is the sum of some smaller variable. This var also need to finish in the form of $.YY .

  1   2   3   4   5   6   7   8   9   10   >