Re: [PHP-WIN] variable in an array? Answer: Double quotes

2006-03-03 Thread John Ellingsworth
The answer to the interpolation problem is to use double quotes: $dsn = "{$servers["$id"]["type"]}://{$servers["$id"]["username"]}:{$servers["$id"]["password"[EMAIL PROTECTED]"$id"]["hostName"]}/{$servers["$id"]["databaseName"]}"; John Ellingsworth wrote: Hi. I am sure there is an easy answe

[PHP-WIN] variable in an array?

2006-03-03 Thread John Ellingsworth
Hi. I am sure there is an easy answer to this, but I do not know it and have not found the answer anywhere. I want to be able to dynamically set my database from an array of options: $database = array( array( "type" => "mssql", "name" => "database1", "hostName" =>

RE: [PHP-WIN] variable passing problem

2004-03-19 Thread Svensson, B.A.T. (HKG)
-3-2004 12:42 Subject: Re: [PHP-WIN] variable passing problem then it says... Notice: Undefined index: fileToUpload in e:\viraj\office\inventory\2.php on line 3 (fileToUpload is the variable name) any suggestions? Viraj. "Svensson, B.A.T. (HKG)" wrote: &g

Re: [PHP-WIN] variable passing problem

2004-03-19 Thread Viraj Kalinga Abayarathna
then it says... Notice: Undefined index: fileToUpload in e:\viraj\office\inventory\2.php on line 3 (fileToUpload is the variable name) any suggestions? Viraj. "Svensson, B.A.T. (HKG)" wrote: > > > (on windows: Notice: Undefined variable: fileToUpload in > > e:\viraj\office\inventory\2.ph

RE: [PHP-WIN] variable passing problem

2004-03-19 Thread Svensson, B.A.T. (HKG)
> (on windows: Notice: Undefined variable: fileToUpload in > e:\viraj\office\inventory\2.php on line 3) (on Linux: > Resource id #1 ) Using $_POST['fileToUpload'], will probably solve that problem for you. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

[PHP-WIN] variable passing problem

2004-03-19 Thread Viraj Kalinga Abayarathna
Hi all, I have a script to upload a file into MySQL as BLOB. this script works nicely on a LAMP server, but i have to implement it on a Windows2000 server running PHP, Apache and MySQL. -- here goes the "gather.php" content, which allow us to browse for a specific file in the system, and a "Up

[PHP-WIN] Variable Problems

2003-06-06 Thread Dylan Williams
Hi all, I'm having trouble using variables. If I create a PHP file and define the variables within it (e.g. $name = "Bob";) and then ask the same file to ouput the variable as part of an echo command (e.g. echo( "Hello, $name"); ), it works fine. The problem comes when I try to link to a PHP fi

[PHP-WIN] Variable

2003-06-01 Thread Adrian Labastida
Hi, is there anyway to set the $document_root customized for each site? so a user can take as doc root the root of their homesite? im win2k adv serv with php 4.3.0, danke :) -- SSS. Lic. Ádrian Enrique Labastida Cañizares Gerencia de Sistemas & Administración Web Host Depot S.A. de C.V. [EMAIL P

[PHP-WIN] Variable problems

2003-03-09 Thread Reggie P
I am new to php and I am having problems passing variables from one page to another. I wrote a simple script as such: name then pass to this page: I get this for the response: Notice: Undefined variable: test in E:\websites\girls\cgi-bin\insert2.php on line 8 Please help!!

Re: [PHP-WIN] Variable problem

2002-11-18 Thread Stephen Edmonds
e this helps Stephen - Original Message - From: "suhailkaleem" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 1:05 PM Subject: [PHP-WIN] Variable problem > hi ! > > yes you were right there is space between server name but

[PHP-WIN] Variable problem

2002-11-18 Thread suhailkaleem
hi ! yes you were right there is space between server name but still i am unable to remove it $username ,$password,$server are comming from file and they have correct values $username1 = $username; $password1 = $password; $server1 = $server; echo $server."test" ; echo $password."test" ; echo $

[PHP-WIN] Variable error

2002-09-12 Thread Silbermann, Peter
I have an file application that works for some data but not other?? The error I'm getting causes an error on line 64 for (reset($t1); $ti=current($tl) any thoughts?? System; $connID = connect_to_np_system($sysid); // get list of steps for the ENTIRE

[PHP-WIN] variable access

2002-06-14 Thread Si Ming
I have register_globals = off and whenever I try to access a variable I MUST use $_SERVER["var"], $_POST["var"], etc... Is there a way to just simply access the variable as $var instead? I don't want to turn on register_globals but I like to have short variable names... Someone has told me that

Re: [PHP-WIN] Variable scope in loops

2001-07-31 Thread Mike Flynn
Hi Tom, First problem, is that the variable $incident_array isn't declared beforehand outside the loop. Do: var $incident_array = array(); before the loop. That way PHP doesn't assume that it's scoping is only for within the loop, since that's where the variable is created, not having been p

Re: [PHP-WIN] Variable scope in loops

2001-07-31 Thread Paul Smith
Whoops, my mistake. I read your code completely wrong. Ignore my comments. You are calling the first variable but I didn't expect it to be called like that. I expected that the array would be appended to by calling it like this: $incident_array[]=$value; Nevermind, sorry 'bout that. Paul

Re: [PHP-WIN] Variable scope in loops

2001-07-31 Thread Paul Smith
Well, first of all, to get the first value of the array you should call it as $incidnet_array[0]. Now doing that *might* fix your problem if you were only recieving one value for the array. So if you were getting output inside the array, how many outputs were you getting? One or two or more? ~Pau

[PHP-WIN] Variable scope in loops

2001-07-31 Thread Tom Tsongas
Hi folks. I have an interesting problem with regards to variable scope in loops. Now I understand how this operates in functions but its the first time I have seen variable scope in a loop. Below is a code snippet of what I have: // execute SQL query OCIExecute($sql_statement) or die("Couldn't

Re: [PHP-WIN] Variable in the statement

2001-05-22 Thread Johannes Janson
Hi, >global $titel; > $titel='html' missing colon; > $db = mysql_connect("localhost", "root") or die ("Kan geen connectie > maken met het database programma. De Database server kan uit staan.");; > mysql_select_db("setf",$db) or die ("Kan geen connectie maken met de > database"); > > $r

[PHP-WIN] Variable in the statement

2001-05-22 Thread Pepijn Minderhoud
Hi, I've got a problem with variables. I am trying to make a select staement for mysql using a variable in the where clause. If i don't use the variable the result comes out fine but with it there are parser errors on other lines. Can anybody tell me how to insert a variable in such a script.

[PHP-WIN] Variable problems

2001-01-29 Thread Diverge
Hi. I've sort of programmed myself into a corner on a recent projekt i've been working on. This is the last part of the projekt, and i sure hope someone can help me on this one. Scenario is: I want to read a HTML file containing PHP variables into a string, then replace the variables with tex