php-general Digest 18 Apr 2001 19:05:01 -0000 Issue 635

Topics (messages 49133 through 49246):

mySQL - select column
        49133 by: Julian Wood

Re: Is it possible to parse a variable by character?
        49134 by: CC Zona
        49143 by: Sean Coyle
        49144 by: Sean Coyle
        49170 by: Wico de Leeuw
        49192 by: Christian Reiniger
        49194 by: Christian Reiniger
        49204 by: Sean Coyle
        49239 by: Yasuo Ohgaki

Re: need help
        49135 by: Geir Eivind Mork
        49136 by: David Robley
        49233 by: Joe Stump

Re: PHP/OCI8 design for persistent connection tuning
        49137 by: Remigiusz Sokolowski

Variable variable
        49138 by: Jacky
        49139 by: Ulf Wendel
        49140 by: Chris Fry
        49141 by: Jacky
        49142 by: Jacky
        49149 by: Chris Fry
        49150 by: Jacky
        49161 by: Chris Fry
        49175 by: Plutarck
        49211 by: Steve Werby
        49213 by: Rasmus Lerdorf
        49223 by: Steve Werby
        49226 by: Rasmus Lerdorf
        49228 by: Plutarck

Cannot destroy session cookie
        49145 by: Jens Kisters
        49197 by: Johannes Janson
        49224 by: Jens Kisters
        49227 by: Johannes Janson

Re: highlighting search results (revisited)
        49146 by: Matt Williams
        49163 by: Matt Williams

checkbox validation
        49147 by: Jacky
        49148 by: Matt Williams
        49168 by: Robert Vetter

to find out which checkbox is checked
        49151 by: Jacky
        49153 by: Martin Cabrera Diaubalick

Re: SSL SSL SSL SSL -- READ THIS!!!!!!
        49152 by: Jens Fisch
        49242 by: Toby Miller

Re: HTTP_POST_VARS not and array when used in a function?
        49154 by: Alexander Skwar

Re: function to add %20 in place of blank  spaces
        49155 by: Alexander Skwar

Re: php like cgi
        49156 by: Alexander Skwar

php equivalent for `command`
        49157 by: Greig, Euan
        49158 by: Jason Brooke
        49162 by: Greig, Euan
        49219 by: Plutarck

how do I find out which checkbox is checked when form get submit
        49159 by: Jacky
        49165 by: Matt Williams
        49171 by: Szii

print_r style array content
        49160 by: Chien-pin Wang
        49181 by: Neil Kimber
        49189 by: Christian Reiniger

shm_attach not found
        49164 by: Patrick Lai

Connection to postgresql DB used by 2 scripts ?
        49166 by: Picard, Cyril
        49172 by: Johannes Janson
        49184 by: Picard, Cyril
        49215 by: Plutarck

sessions
        49167 by: Ben
        49182 by: Plutarck

What is cookies
        49169 by: Bertrand TACHAGO
        49177 by: Plutarck

write to a file
        49173 by: Wade Halsey

Re: Site Sessions: Online/Offline - help?
        49174 by: Richard

Images only with 256 Colors?!
        49176 by: Nils Sondermann
        49205 by: Rasmus Lerdorf
        49216 by: Yasuo Ohgaki

Re: How do i include ASP script into PHP...??!
        49178 by: Christian Reiniger

Regular Expression
        49179 by: Jeroen Geusebroek
        49193 by: Wico de Leeuw
        49229 by: Christian Reiniger
        49230 by: Christian Reiniger

Re: Persistent connection & many scripts ?
        49180 by: Christian Reiniger
        49183 by: Picard, Cyril
        49217 by: Plutarck
        49218 by: Picard, Cyril
        49220 by: Plutarck

FastCGI and PHP
        49185 by: Alexander Skwar

Re: Importing Data from Text File
        49186 by: Plutarck

Security
        49187 by: Alessandro F. Rocha
        49201 by: Phil Driscoll

global sessions
        49188 by: Ben
        49209 by: Plutarck

Re: Is there such an array like $array[][]?
        49190 by: Tim Ward

Re: mysql error code - how to debug
        49191 by: Plutarck

unixodbc problem
        49195 by: Przem Kowalczyk

Re: Wrox - Beginning PHP4 Ch12 example problem
        49196 by: Dave Mateer

HTTP_POST_VARS variable names?
        49198 by: Mat Marlow
        49199 by: Johannes Janson
        49200 by: Renze Munnik
        49206 by: Plutarck

Re: Why is this happening
        49202 by: Boget, Chris

WDDX Deserialisation problem/bug?
        49203 by: Darren Beale

Connection with a Palm
        49207 by: Renzi, Sebastian
        49210 by: Plutarck
        49212 by: Renzi, Sebastian
        49221 by: Plutarck

New problem with PHP "odbc_exec".
        49208 by: Scott Fletcher
        49214 by: Yasuo Ohgaki
        49246 by: Andrew Hill

Graphic process within PHP
        49222 by: SED

wddx installation
        49225 by: Markus Maussner
        49232 by: Markus Maussner

temp file part II
        49231 by: Randy Johnson

Best non-tackified grip enhancer for golfers>
        49234 by: OWQj5h9v0.excite.com
        49235 by: Kurth Bemis

sybase database connections and ipchains...
        49236 by: Robman

PHP Polls in popup window
        49237 by: Mohamedou
        49238 by: Seung-woo Nam

PUT Method using PHP4/Apache ...
        49240 by: The Hermit Hacker

a different type of mail problem
        49241 by: Joe Sheble (Wizaerd)

Re: mySQL Question....
        49243 by: Toby Miller

array_count_values
        49244 by: Matthew Luchak

Reynolds & Reynolds - php use
        49245 by: Jerry Lake

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------



Hi all,

Given that the resultset from a mysql query is a 2-d array (of sorts - I
don't know), if I retrieve only a single column, is there an easy way to
grab it as a linear array? For example - old way:

$uids=array();
$res = mysql_db_query("db", 'select uid from tbl;', $link);
while ($row = mysql_fetch_row($res)) {
    array_push ($uids, $row[0]);
}

It seems a little redundant to make another array if one already exists. The
end idea is to get to a list of uids ($uid_str = join(',',$uids)) that can
be used in a second query to the db (to make up for the lack of subqueries
in mysql). I guess what I'm asking - can you do a join on the mysql
resultset array somehow. I know in the perl DBI you can get a column of
results, but can't find it in php.

Thx.

J

--
Julian Wood
Learning Technologies and Digital Media
University of Calgary






In article <9bjcj6$dg6$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Yasuo Ohgaki") wrote:

> I'm not sure if accessing string as array is going to be depreciated or not.
> (Or is it already depreciated???)

I made a note of this a while ago when it came up on the list, because 
initially it sounded to me too like it was being deprecated.  It's not.  
It's the current *method* for accessing string offsets that is expected to 
be deprecated in the near future.  So instead of using $string[offset], we 
just should get into the habit of using $string{offset} now to save 
ourselves the hassle of going back to fix it later.

-- 
CC




Thanks for that help!  Now I am getting an interesting error that I am not
sure what to make of.

Warning: REG_ERANGE in /home/httpd/www/worldvibe.org/digitall/edit_f.php on
line 91

Here are lines surrounding 91:

89->   strtolower($f_loc_name);
90->   $f_loc_new = "";
91->   $f_loc_new = ereg_replace("[^[_a-z0-9-\.]]", "", $f_loc_name);
92->   $f_loc_name = "";
93->   $f_loc_name = $f_loc_new;

I have tried tow other variations of line 91, and both of them do not seem
to work the way I am hoping for.

I have (since the last message, decided to remove the offending characters,
rather than replace them with an underscore (hence the "").  Below is an
example of what I am trying to accomplish:

Test_File#()*#$.txt should be converted to test_file.txt

TEST.file.#####.txt should be converted to sean.coyle..txt

I am not all that great with regular expressions, so any help I can get on
this is greatly appreciated!

Kind Regards,

Sean


On 4/17/01 11:01 PM, in article
DC017B079D81D411998C009027B7112A015ED111@EXC-TYO-01, "Maxim Maletsky"
<[EMAIL PROTECTED]> wrote:

> 
> $str = eregi_replace("[^[_a-z0-9-]]", '_', $str)
> 
> would this 2-seconds written-in, non-tested scratch of code do the job?
> 
> If not then something like this...
> 
> eregi_replace() is what you are looking for.
> 
> 
> 
> Sincerely, 
> 
> Maxim Maletsky
> Founder, Chief Developer
> PHPBeginner.com (Where PHP Begins)
> [EMAIL PROTECTED]
> www.phpbeginner.com
> 
> 
> 
> 
> -----Original Message-----
> From: Sean Coyle [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 2:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Is it possible to parse a variable by character?
> 
> 
> Hey there guys,
> 
>   This may seem like a dumb question, but I have to ask it anyway.
> 
> I have a form in one of my php based scripts that allows for file uploads.
> I recently noticed a potential issue if people upload files containing
> anything else but the standard characters ([_a-z0-9-]+(\.[_a-z0-9-]).
> 
>   I am not sure if this can be done, but what I need to do is parse this
> variable (lets call it $file_name) by character looking for anything save
> letters a-z (A-Z) and numbers 0-9.  Any arrangements of numbers, letters and
> full stops (.) are to be permitted, and if any character does not meet those
> specifications, that single character should be converted to an underscore.
> 
>   Any ideas on how I can go about doing something like this?
> 
> BTW: (Some background info)  I examined the average validate e-mail idea,
> however, rather than reject the string, I would like to be able to 'replace'
> the offending character.
> 
> Thanks in advance,
> 
> Sean
> 





Oops, noticed a small impossibility error:

TEST.file.#####.txt should be converted to sean.coyle..txt

Should read

TEST.file.#####.txt should be converted to test.file..txt

But, I would imagine you guys figured that one out already.

Cheers,

Sean

On 4/18/01 12:26 AM, in article [EMAIL PROTECTED], "Sean
Coyle" <[EMAIL PROTECTED]> wrote:

> Thanks for that help!  Now I am getting an interesting error that I am not
> sure what to make of.
> 
> Warning: REG_ERANGE in /home/httpd/www/worldvibe.org/digitall/edit_f.php on
> line 91
> 
> Here are lines surrounding 91:
> 
> 89->   strtolower($f_loc_name);
> 90->   $f_loc_new = "";
> 91->   $f_loc_new = ereg_replace("[^[_a-z0-9-\.]]", "", $f_loc_name);
> 92->   $f_loc_name = "";
> 93->   $f_loc_name = $f_loc_new;
> 
> I have tried tow other variations of line 91, and both of them do not seem
> to work the way I am hoping for.
> 
> I have (since the last message, decided to remove the offending characters,
> rather than replace them with an underscore (hence the "").  Below is an
> example of what I am trying to accomplish:
> 
> Test_File#()*#$.txt should be converted to test_file.txt
> 
> TEST.file.#####.txt should be converted to sean.coyle..txt
> 
> I am not all that great with regular expressions, so any help I can get on
> this is greatly appreciated!
> 
> Kind Regards,
> 
> Sean
> 
> 
> On 4/17/01 11:01 PM, in article
> DC017B079D81D411998C009027B7112A015ED111@EXC-TYO-01, "Maxim Maletsky"
> <[EMAIL PROTECTED]> wrote:
> 
>> 
>> $str = eregi_replace("[^[_a-z0-9-]]", '_', $str)
>> 
>> would this 2-seconds written-in, non-tested scratch of code do the job?
>> 
>> If not then something like this...
>> 
>> eregi_replace() is what you are looking for.
>> 
>> 
>> 
>> Sincerely, 
>> 
>> Maxim Maletsky
>> Founder, Chief Developer
>> PHPBeginner.com (Where PHP Begins)
>> [EMAIL PROTECTED]
>> www.phpbeginner.com
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: Sean Coyle [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, April 18, 2001 2:23 PM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Is it possible to parse a variable by character?
>> 
>> 
>> Hey there guys,
>> 
>>   This may seem like a dumb question, but I have to ask it anyway.
>> 
>> I have a form in one of my php based scripts that allows for file uploads.
>> I recently noticed a potential issue if people upload files containing
>> anything else but the standard characters ([_a-z0-9-]+(\.[_a-z0-9-]).
>> 
>>   I am not sure if this can be done, but what I need to do is parse this
>> variable (lets call it $file_name) by character looking for anything save
>> letters a-z (A-Z) and numbers 0-9.  Any arrangements of numbers, letters and
>> full stops (.) are to be permitted, and if any character does not meet those
>> specifications, that single character should be converted to an underscore.
>> 
>>   Any ideas on how I can go about doing something like this?
>> 
>> BTW: (Some background info)  I examined the average validate e-mail idea,
>> however, rather than reject the string, I would like to be able to 'replace'
>> the offending character.
>> 
>> Thanks in advance,
>> 
>> Sean
>> 
> 





At 00:28 18-4-2001 -0700, Sean Coyle wrote:
>Thanks for that help!  Now I am getting an interesting error that I am not
>sure what to make of.
>
>Warning: REG_ERANGE in /home/httpd/www/worldvibe.org/digitall/edit_f.php on
>line 91
>
>Here are lines surrounding 91:
>
>89->   strtolower($f_loc_name);
>90->   $f_loc_new = "";
>91->   $f_loc_new = ereg_replace("[^[_a-z0-9-\.]]", "", $f_loc_name);
>92->   $f_loc_name = "";
>93->   $f_loc_name = $f_loc_new;


$f_loc_new = ereg_replace("[^_a-z0-9-\.]", "", $f_loc_name);



>I have tried tow other variations of line 91, and both of them do not seem
>to work the way I am hoping for.
>
>I have (since the last message, decided to remove the offending characters,
>rather than replace them with an underscore (hence the "").  Below is an
>example of what I am trying to accomplish:
>
>Test_File#()*#$.txt should be converted to test_file.txt
>
>TEST.file.#####.txt should be converted to sean.coyle..txt
>
>I am not all that great with regular expressions, so any help I can get on
>this is greatly appreciated!
>
>Kind Regards,
>
>Sean
>
>
>On 4/17/01 11:01 PM, in article
>DC017B079D81D411998C009027B7112A015ED111@EXC-TYO-01, "Maxim Maletsky"
><[EMAIL PROTECTED]> wrote:
>
> >
> > $str = eregi_replace("[^[_a-z0-9-]]", '_', $str)
> >
> > would this 2-seconds written-in, non-tested scratch of code do the job?
> >
> > If not then something like this...
> >
> > eregi_replace() is what you are looking for.
> >
> >
> >
> > Sincerely,
> >
> > Maxim Maletsky
> > Founder, Chief Developer
> > PHPBeginner.com (Where PHP Begins)
> > [EMAIL PROTECTED]
> > www.phpbeginner.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: Sean Coyle [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 18, 2001 2:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Is it possible to parse a variable by character?
> >
> >
> > Hey there guys,
> >
> >   This may seem like a dumb question, but I have to ask it anyway.
> >
> > I have a form in one of my php based scripts that allows for file uploads.
> > I recently noticed a potential issue if people upload files containing
> > anything else but the standard characters ([_a-z0-9-]+(\.[_a-z0-9-]).
> >
> >   I am not sure if this can be done, but what I need to do is parse this
> > variable (lets call it $file_name) by character looking for anything save
> > letters a-z (A-Z) and numbers 0-9.  Any arrangements of numbers, 
> letters and
> > full stops (.) are to be permitted, and if any character does not meet 
> those
> > specifications, that single character should be converted to an underscore.
> >
> >   Any ideas on how I can go about doing something like this?
> >
> > BTW: (Some background info)  I examined the average validate e-mail idea,
> > however, rather than reject the string, I would like to be able to 
> 'replace'
> > the offending character.
> >
> > Thanks in advance,
> >
> > Sean
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





On Wednesday 18 April 2001 07:22, you wrote:
> Hey there guys,
>
>     This may seem like a dumb question, but I have to ask it anyway.
>
> I have a form in one of my php based scripts that allows for file
> uploads. I recently noticed a potential issue if people upload files
> containing anything else but the standard characters
> ([_a-z0-9-]+(\.[_a-z0-9-]).
>
>     I am not sure if this can be done, but what I need to do is parse
> this variable (lets call it $file_name) by character looking for
> anything save letters a-z (A-Z) and numbers 0-9.  Any arrangements of
> numbers, letters and full stops (.) are to be permitted, and if any
> character does not meet those specifications, that single character
> should be converted to an underscore.

$Input = preg_replace ('/[^\w.-]/', '_', $$Input);

I assumed that you also want to allow "minus" signs.

See the manual section on the regular expression functions 
(Perl-compatible) for an explanation

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

AAAAA - American Association Against Acronym Abuse




On Wednesday 18 April 2001 12:00, you wrote:
> >Warning: REG_ERANGE in
> > /home/httpd/www/worldvibe.org/digitall/edit_f.php on line 91
> >
> >Here are lines surrounding 91:
> >
> >89->   strtolower($f_loc_name);
> >90->   $f_loc_new = "";
> >91->   $f_loc_new = ereg_replace("[^[_a-z0-9-\.]]", "", $f_loc_name);
> >92->   $f_loc_name = "";
> >93->   $f_loc_name = $f_loc_new;
>
> $f_loc_new = ereg_replace("[^_a-z0-9-\.]", "", $f_loc_name);

That, and because the dash needs to be the last character in the 
character class:
$f_loc_new = ereg_replace("[^_a-z0-9.-]", "", $f_loc_name);


-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

AAAAA - American Association Against Acronym Abuse




Christian,

    Thanks for pointing that out!  Everything works excellently now!

    Now, all I have to do, is run another ereg_replace() to look for any
duplicate full stops '.' and replace them with one, but I don't think that
one will be to hard.

For those of you interested, this is what the code looks like now:

if(strlen($flf_desc)) {
      $f_loc_lower = strtolower($f_loc_name);
      $f_loc_new = "";
      $f_loc_new = ereg_replace("[^_a-z0-9\.-]", "", $f_loc_lower);
      $f_loc_name = "";
      $f_loc_name = $f_loc_new;
      $path = $destination.$f_loc_name;
      !file_exists($path) or die("Unable to copy $f_loc_name to location
$URL_sitepath.<BR>Because $f_loc_name already exists there");
      copy($f_loc, $path) or die("Unable to copy $f_loc_name to location
$URL_sitepath. <b><BR>Please phone your admistrator immediatly ASAP</b>");
      $flf_loc = $URL_sitepath.$f_loc_name;
      $f_loc = $flf_loc;
      $flf_name = "$f_loc_name";
      $uploadline2 = "<b>$f_loc_name was uploaded succesfully.</b><br>";
      $uploadline3 = "If you wish to give a path for your clients to
download this file<BR>without having to log in, please send them this
URL<BR><A HREF=\"$flf_loc\">$flf_loc</A>";
}

Thanks the the help!

Cheers,

Sean

On 4/18/01 5:08 AM, in article 01041814104906.00662@chrisbig, "Christian
Reiniger" <[EMAIL PROTECTED]> wrote:

> On Wednesday 18 April 2001 12:00, you wrote:
>>> Warning: REG_ERANGE in
>>> /home/httpd/www/worldvibe.org/digitall/edit_f.php on line 91
>>> 
>>> Here are lines surrounding 91:
>>> 
>>> 89->   strtolower($f_loc_name);
>>> 90->   $f_loc_new = "";
>>> 91->   $f_loc_new = ereg_replace("[^[_a-z0-9-\.]]", "", $f_loc_name);
>>> 92->   $f_loc_name = "";
>>> 93->   $f_loc_name = $f_loc_new;
>> 
>> $f_loc_new = ereg_replace("[^_a-z0-9-\.]", "", $f_loc_name);
> 
> That, and because the dash needs to be the last character in the
> character class:
> $f_loc_new = ereg_replace("[^_a-z0-9.-]", "", $f_loc_name);
> 





I got reply from core developer implementing new syntax. The implementation of syntax $var{index} is not finished yet. So PHP programmers are NOT supposed to use it yet. If you are curious, take a look at php-lang list archive. Again $var{index} is NOT supposed to used. (yet) -- Yasuo Ohgaki "CC Zona" <[EMAIL PROTECTED]> wrote in message 9bjdbf$aq1$[EMAIL PROTECTED]">news:9bjdbf$aq1$[EMAIL PROTECTED]... > In article <9bjcj6$dg6$[EMAIL PROTECTED]>, > [EMAIL PROTECTED] ("Yasuo Ohgaki") wrote: > > > I'm not sure if accessing string as array is going to be depreciated or not. > > (Or is it already depreciated???) > > I made a note of this a while ago when it came up on the list, because > initially it sounded to me too like it was being deprecated. It's not. > It's the current *method* for accessing string offsets that is expected to > be deprecated in the near future. So instead of using $string[offset], we > just should get into the habit of using $string{offset} now to save > ourselves the hassle of going back to fix it later. > > -- > CC > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



On Wednesday 18 April 2001 08:38, chris herring wrote:
>  this is really buggin me... i've got this free-for-all that i want to
> make, and everything seems logical, but....

I did a quick rewrite here. it adds links as people enters them :)
<?
  echo <<<END
        <form method="POST" action="$PHP_SELF" name="linkadd">
      <table border="0" cellspacing="2" cellpadding="0">
      <tr>
        <td>Url: </td>
        <td><input type="text" name="url" size="20" value="http://"></td>
      </tr><tr>
        <td>Name: </td>
        <td><input type="text" name="text" size="20"></td>
      </tr><tr>
        <td colspan="2"><input type="submit" name="submit" value="Generate 
New Link"></td>
      </tr>
      </table>
    </form>
END;

if (isset($url) && isset($text)) {
      if ($fp = fopen("./file.txt", "a")) {
          fwrite($fp, "<a href=\"$url\">$text</a><br>\n", "w");
          fclose($fp);
      }
}
?>


>  echo "<form method=\"POST\" action=\"$PHP_SELF\" name=\"linkadd\">";
>  echo "<input type=\"text\" name=\"url\" size=\"20\"
> value=\"http://\"><br>"; echo "<input type=\"text\" name=\"text\"
> size=\"20\"><br>";
>  echo "<input type=\"submit\" name=\"submit\" value=\"Generate New
> Link\">"; echo "</form>";
>
>
>
>  if (isset($url) && isset($text)) {
>      $fp = fopen("./file.txt", "w");
>      fwrite("$fp", "<a href=\"$url\">$text</a><br>", "w");
>      fclose($fp);
>  }
>
>  ... that isn't writing anything to the file. any help would be
> appreciated. thx in advance

-- 
 php developer / CoreTrek AS        | Real Programs don't use shared text. 
 Sandnes / Rogaland / Norway        | Otherwise, how can they use functions
 web: http://www.moijk.net/         | for scratch space after they are




On Wed, 18 Apr 2001 16:08, chris herring wrote:
> this is really buggin me... i've got this free-for-all that i want to
> make, and everything seems logical, but....
>
> echo "<form method=\"POST\" action=\"$PHP_SELF\" name=\"linkadd\">";
> echo "<input type=\"text\" name=\"url\" size=\"20\"
> value=\"http://\"><br>"; echo "<input type=\"text\" name=\"text\"
> size=\"20\"><br>";
> echo "<input type=\"submit\" name=\"submit\" value=\"Generate New
> Link\">"; echo "</form>";
>
>
>
> if (isset($url) && isset($text)) {
>     $fp = fopen("./file.txt", "w");
>     fwrite("$fp", "<a href=\"$url\">$text</a><br>", "w");
>     fclose($fp);
> }
>
> ... that isn't writing anything to the file. any help would be
> appreciated. thx in advance

The third arg to fwrite (optional) is an integer value for the length of 
the string to be written.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




The 3rd argument for fwrite() is the length of the string. So you should do:

$fp = fopen('./file.txt','w');
$line = "<a href=\"$url\">$text</a><br>\n";
fwrite($fp,$line,strlen($line));
fclose($fp);

--Joe

On Wed, Apr 18, 2001 at 01:38:11AM -0500, chris herring wrote:
> this is really buggin me... i've got this free-for-all that i want to make, and 
>everything seems logical, but....
> 
> echo "<form method=\"POST\" action=\"$PHP_SELF\" name=\"linkadd\">";
> echo "<input type=\"text\" name=\"url\" size=\"20\" value=\"http://\"><br>";
> echo "<input type=\"text\" name=\"text\" size=\"20\"><br>";
> echo "<input type=\"submit\" name=\"submit\" value=\"Generate New Link\">";
> echo "</form>";
> 
> 
> 
> if (isset($url) && isset($text)) {
>     $fp = fopen("./file.txt", "w");
>     fwrite("$fp", "<a href=\"$url\">$text</a><br>", "w");
>     fclose($fp);
> }
> 
> ... that isn't writing anything to the file. any help would be appreciated. thx in 
>advance


/* Joe Stump
 * Sr. PHP Developer 
 * http://www.Care2.com http://www.joestump.net http://gtk.php-coder.net
 */





Dave Thomas wrote:
> 
> Yeah, that's what I'm thinking.  I could tune the images server way down for flat 
>content and massive bandwith.
> 
> The only problem I can see is that webmasters hate having to code that extra info.

Hi!
You could also think about something like sqlRelay (www.firstworks.com)
- it provides the same (or almost the same) functionality for Oracle as
PHP and gives You some kind of spool of connections.
Though it is not persistent connection to Apache/PHP, the speed is
interesting - from Oracle to sqlRelay there are few persistent
connections, which can be shared between Apache processes - connection
to sqlrelay from Apache/PHP is fast - the best way is to use AF_UNIX
socket.
If You use it, it'll be very interesting to hear Your opinion
        Regards

-- 

-------------------------------------------------------------------/\------
Remigiusz Sokolowski      e-mail: [EMAIL PROTECTED]            /  \          
-----------------------------------------------------------------/____\-----




Hi all
I have a form with check box and name of those checkboxes is usuing variable lke this, 

<!-- I got the value $id from a table and looping them and assign them to the check 
box name-->
<input type="checkbox" name ="$id" value="on">

and when I submit the form to page foo.php4, at that page, I use Variable variable to 
call the value of the check box to see if it checked like this

$quey = "select id from table";
$result = ...... ( assumeing it is done and i got value for $id for all records from 
table)

if ($$id =="on"){
echo "on";
}else{
echo "off";
}

It always returns echo "off", why is that?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"






Jacky schrieb:
> <!-- I got the value $id from a table and looping them and assign them to the check 
>box name-->
> <input type="checkbox" name ="$id" value="on">
> 
> and when I submit the form to page foo.php4, at that page, I use Variable variable 
>to call the value of the check box to see if it checked like this
> 
> $quey = "select id from table";
> $result = ...... ( assumeing it is done and i got value for $id for all records from 
>table)
> 
> if ($$id =="on"){
> echo "on";
> }else{
> echo "off";
> }

What's the value of $id in the second snippet? Generally speaking using
$GLOBALS[$id] gives you more readable code but variable variables.

Ulf

-- 
Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
http://www.ulf-wendel.de/projekte/menu/tutorial.php |
http://www.phpdoc.de




Jacky,

You do not need the value. The variable $id will either exist (if the user checked it) 
or not (if the user did not check it).

Hope this helps.

Chris

Jacky wrote:

> Hi all
> I have a form with check box and name of those checkboxes is usuing variable lke 
>this,
>
> <!-- I got the value $id from a table and looping them and assign them to the check 
>box name-->
> <input type="checkbox" name ="$id" value="on">
>
> and when I submit the form to page foo.php4, at that page, I use Variable variable 
>to call the value of the check box to see if it checked like this
>
> $quey = "select id from table";
> $result = ...... ( assumeing it is done and i got value for $id for all records from 
>table)
>
> if ($$id =="on"){
> echo "on";
> }else{
> echo "off";
> }
>
> It always returns echo "off", why is that?
> cheers
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.






the variable $id in the second sniplet come from the id from talble when I
run query and loop it using mysql_fetch_array. So I end up have value of $id
from the id field from table, right?But the value store in $id is now in
string value, and if I need to use that value for the if..then.. else
condition to check if which checkbox is checked, I will need to use Variable
variable to make the string back to be variable again , like $$id, for
instance after I run the query and get all Id value from table, it will be
like
$id = 1, $id=2, and so on
and as I used this for checkbox name at the previous page, in order to uset
it in the if..then..else condition in the second sniplet, it will be like
if ($1=="on") {
do something
}else{
do somehting
}
 but something is wrong here at the if then else bit. But I don't know what
is it.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Ulf Wendel <[EMAIL PROTECTED]>
To: Jacky <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 2:20 AM
Subject: Re: [PHP] Variable variable


>
>
> Jacky schrieb:
> > <!-- I got the value $id from a table and looping them and assign them
to the check box name-->
> > <input type="checkbox" name ="$id" value="on">
> >
> > and when I submit the form to page foo.php4, at that page, I use
Variable variable to call the value of the check box to see if it checked
like this
> >
> > $quey = "select id from table";
> > $result = ...... ( assumeing it is done and i got value for $id for all
records from table)
> >
> > if ($$id =="on"){
> > echo "on";
> > }else{
> > echo "off";
> > }
>
> What's the value of $id in the second snippet? Generally speaking using
> $GLOBALS[$id] gives you more readable code but variable variables.
>
> Ulf
>
> --
> Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt
> http://www.ulf-wendel.de/projekte/menu/tutorial.php |
> http://www.phpdoc.de
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





so how do I check at the next page which one is checked?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Chris Fry <[EMAIL PROTECTED]>
To: Jacky <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 2:31 AM
Subject: Re: [PHP] Variable variable


> Jacky,
>
> You do not need the value. The variable $id will either exist (if the user
checked it) or not (if the user did not check it).
>
> Hope this helps.
>
> Chris
>
> Jacky wrote:
>
> > Hi all
> > I have a form with check box and name of those checkboxes is usuing
variable lke this,
> >
> > <!-- I got the value $id from a table and looping them and assign them
to the check box name-->
> > <input type="checkbox" name ="$id" value="on">
> >
> > and when I submit the form to page foo.php4, at that page, I use
Variable variable to call the value of the check box to see if it checked
like this
> >
> > $quey = "select id from table";
> > $result = ...... ( assumeing it is done and i got value for $id for all
records from table)
> >
> > if ($$id =="on"){
> > echo "on";
> > }else{
> > echo "off";
> > }
> >
> > It always returns echo "off", why is that?
> > cheers
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
yourself"
>
> --
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce Solutions
> 10 Gray Street
> Kogarah
> NSW  2217
> Australia
>
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: [EMAIL PROTECTED]
> http://www.quillsoft.com.au
>
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
>
> **********************************************************************
>
> This information contains confidential information intended only for
> the use of the authorised recipient.  If you are not an authorised
> recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit, store or act
> in reliance on this e-mail or any attachments, and should destroy all
> copies of them.
> This e-mail and any attachments may also contain copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this e-mail if
> you are authorised to do so.
>
> This notice should not be removed.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Sorry - thought you only had one! - it's late.

To Name the checkboxes you need:
<?php
while (get records from db) {
    $id = id from record;
?>
    <input type="checkbox" name ="<?php print $id; ?>">
<?php
}
?>

You would have to do a $HTTP_GET_VARS on the next page to find out which ones
exist.

Then your select statement would be:

$query = "select * from table where id IN ('comma delimited list of values')";

Messy but do-able!

Probably a better way - There usually is!

Chris

Jacky wrote:

> so how do I check at the next page which one is checked?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> ----- Original Message -----
> From: Chris Fry <[EMAIL PROTECTED]>
> To: Jacky <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 2:31 AM
> Subject: Re: [PHP] Variable variable
>
> > Jacky,
> >
> > You do not need the value. The variable $id will either exist (if the user
> checked it) or not (if the user did not check it).
> >
> > Hope this helps.
> >
> > Chris
> >
> > Jacky wrote:
> >
> > > Hi all
> > > I have a form with check box and name of those checkboxes is usuing
> variable lke this,
> > >
> > > <!-- I got the value $id from a table and looping them and assign them
> to the check box name-->
> > > <input type="checkbox" name ="$id" value="on">
> > >
> > > and when I submit the form to page foo.php4, at that page, I use
> Variable variable to call the value of the check box to see if it checked
> like this
> > >
> > > $quey = "select id from table";
> > > $result = ...... ( assumeing it is done and i got value for $id for all
> records from table)
> > >
> > > if ($$id =="on"){
> > > echo "on";
> > > }else{
> > > echo "off";
> > > }
> > >
> > > It always returns echo "off", why is that?
> > > cheers
> > > Jack
> > > [EMAIL PROTECTED]
> > > "There is nothing more rewarding than reaching the goal you set for
> yourself"
> >
> > --
> > Chris Fry
> > Quillsoft Pty Ltd
> > Specialists in Secure Internet Services and E-Commerce Solutions
> > 10 Gray Street
> > Kogarah
> > NSW  2217
> > Australia
> >
> > Phone: +61 2 9553 1691
> > Fax: +61 2 9553 1692
> > Mobile: 0419 414 323
> > eMail: [EMAIL PROTECTED]
> > http://www.quillsoft.com.au
> >
> > You can download our Public CA Certificate from:-
> > https://ca.secureanywhere.com/htdocs/cacert.crt
> >
> > **********************************************************************
> >
> > This information contains confidential information intended only for
> > the use of the authorised recipient.  If you are not an authorised
> > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > e-mail.
> > In this case, you should not read, print, re-transmit, store or act
> > in reliance on this e-mail or any attachments, and should destroy all
> > copies of them.
> > This e-mail and any attachments may also contain copyright material
> > belonging to Quillsoft Pty Ltd.
> > The views expressed in this e-mail or attachments are the views of
> > the author and not the views of Quillsoft Pty Ltd.
> > You should only deal with the material contained in this e-mail if
> > you are authorised to do so.
> >
> > This notice should not be removed.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.






I did look up in the manual for $HTTP_GET_VARS but could not find it? what
is it? a function?
sorry to ask this again, just try to find out how to use that.
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Chris Fry <[EMAIL PROTECTED]>
To: Jacky <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 2:59 AM
Subject: Re: [PHP] Variable variable


> Sorry - thought you only had one! - it's late.
>
> To Name the checkboxes you need:
> <?php
> while (get records from db) {
>     $id = id from record;
> ?>
>     <input type="checkbox" name ="<?php print $id; ?>">
> <?php
> }
> ?>
>
> You would have to do a $HTTP_GET_VARS on the next page to find out which
ones
> exist.
>
> Then your select statement would be:
>
> $query = "select * from table where id IN ('comma delimited list of
values')";
>
> Messy but do-able!
>
> Probably a better way - There usually is!
>
> Chris
>
> Jacky wrote:
>
> > so how do I check at the next page which one is checked?
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > ----- Original Message -----
> > From: Chris Fry <[EMAIL PROTECTED]>
> > To: Jacky <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 18, 2001 2:31 AM
> > Subject: Re: [PHP] Variable variable
> >
> > > Jacky,
> > >
> > > You do not need the value. The variable $id will either exist (if the
user
> > checked it) or not (if the user did not check it).
> > >
> > > Hope this helps.
> > >
> > > Chris
> > >
> > > Jacky wrote:
> > >
> > > > Hi all
> > > > I have a form with check box and name of those checkboxes is usuing
> > variable lke this,
> > > >
> > > > <!-- I got the value $id from a table and looping them and assign
them
> > to the check box name-->
> > > > <input type="checkbox" name ="$id" value="on">
> > > >
> > > > and when I submit the form to page foo.php4, at that page, I use
> > Variable variable to call the value of the check box to see if it
checked
> > like this
> > > >
> > > > $quey = "select id from table";
> > > > $result = ...... ( assumeing it is done and i got value for $id for
all
> > records from table)
> > > >
> > > > if ($$id =="on"){
> > > > echo "on";
> > > > }else{
> > > > echo "off";
> > > > }
> > > >
> > > > It always returns echo "off", why is that?
> > > > cheers
> > > > Jack
> > > > [EMAIL PROTECTED]
> > > > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > >
> > > --
> > > Chris Fry
> > > Quillsoft Pty Ltd
> > > Specialists in Secure Internet Services and E-Commerce Solutions
> > > 10 Gray Street
> > > Kogarah
> > > NSW  2217
> > > Australia
> > >
> > > Phone: +61 2 9553 1691
> > > Fax: +61 2 9553 1692
> > > Mobile: 0419 414 323
> > > eMail: [EMAIL PROTECTED]
> > > http://www.quillsoft.com.au
> > >
> > > You can download our Public CA Certificate from:-
> > > https://ca.secureanywhere.com/htdocs/cacert.crt
> > >
> > > **********************************************************************
> > >
> > > This information contains confidential information intended only for
> > > the use of the authorised recipient.  If you are not an authorised
> > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > > e-mail.
> > > In this case, you should not read, print, re-transmit, store or act
> > > in reliance on this e-mail or any attachments, and should destroy all
> > > copies of them.
> > > This e-mail and any attachments may also contain copyright material
> > > belonging to Quillsoft Pty Ltd.
> > > The views expressed in this e-mail or attachments are the views of
> > > the author and not the views of Quillsoft Pty Ltd.
> > > You should only deal with the material contained in this e-mail if
> > > you are authorised to do so.
> > >
> > > This notice should not be removed.
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce Solutions
> 10 Gray Street
> Kogarah
> NSW  2217
> Australia
>
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: [EMAIL PROTECTED]
> http://www.quillsoft.com.au
>
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
>
> **********************************************************************
>
> This information contains confidential information intended only for
> the use of the authorised recipient.  If you are not an authorised
> recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit, store or act
> in reliance on this e-mail or any attachments, and should destroy all
> copies of them.
> This e-mail and any attachments may also contain copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this e-mail if
> you are authorised to do so.
>
> This notice should not be removed.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Sorry - try $HTTP_POST_VARS

Chris

Jacky wrote:

> I did look up in the manual for $HTTP_GET_VARS but could not find it? what
> is it? a function?
> sorry to ask this again, just try to find out how to use that.
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> ----- Original Message -----
> From: Chris Fry <[EMAIL PROTECTED]>
> To: Jacky <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 2:59 AM
> Subject: Re: [PHP] Variable variable
>
> > Sorry - thought you only had one! - it's late.
> >
> > To Name the checkboxes you need:
> > <?php
> > while (get records from db) {
> >     $id = id from record;
> > ?>
> >     <input type="checkbox" name ="<?php print $id; ?>">
> > <?php
> > }
> > ?>
> >
> > You would have to do a $HTTP_GET_VARS on the next page to find out which
> ones
> > exist.
> >
> > Then your select statement would be:
> >
> > $query = "select * from table where id IN ('comma delimited list of
> values')";
> >
> > Messy but do-able!
> >
> > Probably a better way - There usually is!
> >
> > Chris
> >
> > Jacky wrote:
> >
> > > so how do I check at the next page which one is checked?
> > > Jack
> > > [EMAIL PROTECTED]
> > > "There is nothing more rewarding than reaching the goal you set for
> > > yourself"
> > > ----- Original Message -----
> > > From: Chris Fry <[EMAIL PROTECTED]>
> > > To: Jacky <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, April 18, 2001 2:31 AM
> > > Subject: Re: [PHP] Variable variable
> > >
> > > > Jacky,
> > > >
> > > > You do not need the value. The variable $id will either exist (if the
> user
> > > checked it) or not (if the user did not check it).
> > > >
> > > > Hope this helps.
> > > >
> > > > Chris
> > > >
> > > > Jacky wrote:
> > > >
> > > > > Hi all
> > > > > I have a form with check box and name of those checkboxes is usuing
> > > variable lke this,
> > > > >
> > > > > <!-- I got the value $id from a table and looping them and assign
> them
> > > to the check box name-->
> > > > > <input type="checkbox" name ="$id" value="on">
> > > > >
> > > > > and when I submit the form to page foo.php4, at that page, I use
> > > Variable variable to call the value of the check box to see if it
> checked
> > > like this
> > > > >
> > > > > $quey = "select id from table";
> > > > > $result = ...... ( assumeing it is done and i got value for $id for
> all
> > > records from table)
> > > > >
> > > > > if ($$id =="on"){
> > > > > echo "on";
> > > > > }else{
> > > > > echo "off";
> > > > > }
> > > > >
> > > > > It always returns echo "off", why is that?
> > > > > cheers
> > > > > Jack
> > > > > [EMAIL PROTECTED]
> > > > > "There is nothing more rewarding than reaching the goal you set for
> > > yourself"
> > > >
> > > > --
> > > > Chris Fry
> > > > Quillsoft Pty Ltd
> > > > Specialists in Secure Internet Services and E-Commerce Solutions
> > > > 10 Gray Street
> > > > Kogarah
> > > > NSW  2217
> > > > Australia
> > > >
> > > > Phone: +61 2 9553 1691
> > > > Fax: +61 2 9553 1692
> > > > Mobile: 0419 414 323
> > > > eMail: [EMAIL PROTECTED]
> > > > http://www.quillsoft.com.au
> > > >
> > > > You can download our Public CA Certificate from:-
> > > > https://ca.secureanywhere.com/htdocs/cacert.crt
> > > >
> > > > **********************************************************************
> > > >
> > > > This information contains confidential information intended only for
> > > > the use of the authorised recipient.  If you are not an authorised
> > > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > > > e-mail.
> > > > In this case, you should not read, print, re-transmit, store or act
> > > > in reliance on this e-mail or any attachments, and should destroy all
> > > > copies of them.
> > > > This e-mail and any attachments may also contain copyright material
> > > > belonging to Quillsoft Pty Ltd.
> > > > The views expressed in this e-mail or attachments are the views of
> > > > the author and not the views of Quillsoft Pty Ltd.
> > > > You should only deal with the material contained in this e-mail if
> > > > you are authorised to do so.
> > > >
> > > > This notice should not be removed.
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Chris Fry
> > Quillsoft Pty Ltd
> > Specialists in Secure Internet Services and E-Commerce Solutions
> > 10 Gray Street
> > Kogarah
> > NSW  2217
> > Australia
> >
> > Phone: +61 2 9553 1691
> > Fax: +61 2 9553 1692
> > Mobile: 0419 414 323
> > eMail: [EMAIL PROTECTED]
> > http://www.quillsoft.com.au
> >
> > You can download our Public CA Certificate from:-
> > https://ca.secureanywhere.com/htdocs/cacert.crt
> >
> > **********************************************************************
> >
> > This information contains confidential information intended only for
> > the use of the authorised recipient.  If you are not an authorised
> > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > e-mail.
> > In this case, you should not read, print, re-transmit, store or act
> > in reliance on this e-mail or any attachments, and should destroy all
> > copies of them.
> > This e-mail and any attachments may also contain copyright material
> > belonging to Quillsoft Pty Ltd.
> > The views expressed in this e-mail or attachments are the views of
> > the author and not the views of Quillsoft Pty Ltd.
> > You should only deal with the material contained in this e-mail if
> > you are authorised to do so.
> >
> > This notice should not be removed.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >

--
Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**********************************************************************

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.






Your problem has little to do with the things mentioned.

First of all, you are refering to a variable variable incorrectly. You must
use brackets, like this:

${$id}

If ID has the value "Blue", then the above is the same as:

$Blue

So in your examble if you had the checkbox with the value "on", and you want
to see if it was checked, use this:

if (${$id} == "on")
{
    echo 'on';
} else
{
    echo 'off';
}

But that's an overly complicated way of doing it if you know the "name" of
the checkbox. If the name of the checkbox is "id", then use this piece of
code to access it if it was submitted via POST or GET (which works even if
register_globals is turned off):

$f = 'HTTP_' . $HTTP_ENV_VARS["REQUEST_METHOD"] . '_VARS';

if (${$f}["id"] == "on")
{
    echo 'The checkbox with the name "id" has the value "on"';
} else
{
    echo "The checkbox with the name "id" was not selected";
}


But if register globals was on, all you have to use is:

if ($id == "on")
{
    echo 'The checkbox with the name "id" has the value "on"';
} else
{
    echo "The checkbox with the name "id" was not selected";
}


Tell me if that doesn't answer your questions.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Jacky"" <[EMAIL PROTECTED]> wrote in message
011001c0c839$ebfb9b40$[EMAIL PROTECTED]">news:011001c0c839$ebfb9b40$[EMAIL PROTECTED]...
Hi all
I have a form with check box and name of those checkboxes is usuing variable
lke this,

<!-- I got the value $id from a table and looping them and assign them to
the check box name-->
<input type="checkbox" name ="$id" value="on">

and when I submit the form to page foo.php4, at that page, I use Variable
variable to call the value of the check box to see if it checked like this

$quey = "select id from table";
$result = ...... ( assumeing it is done and i got value for $id for all
records from table)

if ($$id =="on"){
echo "on";
}else{
echo "off";
}

It always returns echo "off", why is that?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"







"Plutarck" <[EMAIL PROTECTED]> wrote:
> Your problem has little to do with the things mentioned.
>
> First of all, you are refering to a variable variable incorrectly.

Actually, he's not.

>You must
> use brackets, like this:
>
> ${$id}

The braces aren't required in this case.  Of the four examples below, only
the 3rd won't return the expected results - because the first $ is
interpreted as a literal $.  Paste the code below into a webpage and see for
yourself.

<?php
$field = 'name';
$name = 'Steve';

echo '<br>' . $$field;
echo '<br>' . ${$field};
echo '<br>' . "My name is $$field.";
echo '<br>' . "My name is ${$field}.";
?>

I have a few possible explanations for the problem of the original poster
(see below).

> if (${$id} == "on")
> {
>     echo 'on';
> } else
> {
>     echo 'off';
> }

1. If $id is a number I believe PHP will choke b/c I don't believe numbers
can be used as variable names.

2. Assume $id = 'age_bracket'.  The control structure checks to see if
$age_bracket == "on".  To set $id in the first place for your multiple
checkbox values, you'd have to loop through the values sent from the form.
Jack (original poster), did you do that?  If your form's method = post then
you would loop through $HTTP_POST_VARS and if it was get $HTTP_GET_VARS (and
then only loop through the checkbox variables).  Or you could predefine the
checkbox variables using:

$checkbox_fields = array( 'age_bracket', 'weight', 'gender', 'occupation' );

And then loop through as follows:

while( list( , $val ) = each( $checkbox_fields ) )
{
// may have to set as $$GLOBALS[$val] if within a function or declare $val
as global first.
    if ( $$val == 'on' )
    {
        echo 'on';
    }
    else
    {
        echo 'off';
     }
}

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/





> 1. If $id is a number I believe PHP will choke b/c I don't believe numbers
> can be used as variable names.

Well, generally that is true.  If you try to assign a value directly to a
variable that is a number such as:

 $1 = "Hello World";

Then it won't work.  However, due to a somewhat quirky implementation you
can get arund this by doing:

 $a=1;
 $$a = "Hello World";

You can verify that you do indeed have a variable named $1 in your global
symbol table by doing:

 echo $GLOBALS[1];

-Rasmus





"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote:
> > 1. If $id is a number I believe PHP will choke b/c I don't believe
numbers
> > can be used as variable names.
>
> Well, generally that is true.  If you try to assign a value directly to a
> variable that is a number such as:
>
>  $1 = "Hello World";
>
> Then it won't work.  However, due to a somewhat quirky implementation you
> can get arund this by doing:
>
>  $a=1;
>  $$a = "Hello World";

Sure enough, it works.  Rasmus, can we expect this behavior to exist in
future releases of PHP?  I prefer to give variables a meaningful name, but
since I spend a fair amount of time working with other people's code and
clients who sometimes insist on things that aren't preferable, it would be
nice to know.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/





> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote:
> > > 1. If $id is a number I believe PHP will choke b/c I don't believe
> numbers
> > > can be used as variable names.
> >
> > Well, generally that is true.  If you try to assign a value directly to a
> > variable that is a number such as:
> >
> >  $1 = "Hello World";
> >
> > Then it won't work.  However, due to a somewhat quirky implementation you
> > can get arund this by doing:
> >
> >  $a=1;
> >  $$a = "Hello World";
>
> Sure enough, it works.  Rasmus, can we expect this behavior to exist in
> future releases of PHP?  I prefer to give variables a meaningful name, but
> since I spend a fair amount of time working with other people's code and
> clients who sometimes insist on things that aren't preferable, it would be
> nice to know.

Writing code that relies on this behaviour is a bad idea.  It is unlikely
to change in PHP 4, but who knows what will happen in the longer term...

-Rasmus





> The braces aren't required in this case.

Yup, your right. I stand corrected.

I had forgotten that multiple $s are fine, and that I simply don't use them
because I have trouble reading them.

The joys of learning ;\


--
Plutarck
Should be working on something...
...but forgot what it was.


""Steve Werby"" <[EMAIL PROTECTED]> wrote in message
001e01c0c80e$45410400$6501a8c0@workstation7">news:001e01c0c80e$45410400$6501a8c0@workstation7...
> "Plutarck" <[EMAIL PROTECTED]> wrote:
> > Your problem has little to do with the things mentioned.
> >
> > First of all, you are refering to a variable variable incorrectly.
>
> Actually, he's not.
>
> >You must
> > use brackets, like this:
> >
> > ${$id}
>
> The braces aren't required in this case.  Of the four examples below, only
> the 3rd won't return the expected results - because the first $ is
> interpreted as a literal $.  Paste the code below into a webpage and see
for
> yourself.
>
> <?php
> $field = 'name';
> $name = 'Steve';
>
> echo '<br>' . $$field;
> echo '<br>' . ${$field};
> echo '<br>' . "My name is $$field.";
> echo '<br>' . "My name is ${$field}.";
> ?>
>
> I have a few possible explanations for the problem of the original poster
> (see below).
>
> > if (${$id} == "on")
> > {
> >     echo 'on';
> > } else
> > {
> >     echo 'off';
> > }
>
> 1. If $id is a number I believe PHP will choke b/c I don't believe numbers
> can be used as variable names.
>
> 2. Assume $id = 'age_bracket'.  The control structure checks to see if
> $age_bracket == "on".  To set $id in the first place for your multiple
> checkbox values, you'd have to loop through the values sent from the form.
> Jack (original poster), did you do that?  If your form's method = post
then
> you would loop through $HTTP_POST_VARS and if it was get $HTTP_GET_VARS
(and
> then only loop through the checkbox variables).  Or you could predefine
the
> checkbox variables using:
>
> $checkbox_fields = array( 'age_bracket', 'weight', 'gender',
'occupation' );
>
> And then loop through as follows:
>
> while( list( , $val ) = each( $checkbox_fields ) )
> {
> // may have to set as $$GLOBALS[$val] if within a function or declare $val
> as global first.
>     if ( $$val == 'on' )
>     {
>         echo 'on';
>     }
>     else
>     {
>         echo 'off';
>      }
> }
>
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.com/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi there,
i'm having a little trouble with cleaning up sessions.
I have a login page that sets a certain session variable that is used to
determine wether a user is logged on.
When the user has cookies turned on the application recognizes the
running session an resumes it, that also happens on the login-page,
i'd like to explicitly destroy the session before logging on, i tried
unsetting the session variable, destroying the session, unsetting the
session cookie, but nothing worked, the session is always continued with
the same SessionID.
What can i do to destroy the session?

tks
Jens

--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de






Hi,

Why destroying it "before" a user logs in? Isn't it
better to start the session "after" a successful login?
And then destroying the session when the user logs out.
Or did I get it wrong. A few lines of code would help
to understand.

Johannes


"Jens Kisters" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi there,
i'm having a little trouble with cleaning up sessions.
I have a login page that sets a certain session variable that is used to
determine wether a user is logged on.
When the user has cookies turned on the application recognizes the
running session an resumes it, that also happens on the login-page,
i'd like to explicitly destroy the session before logging on, i tried
unsetting the session variable, destroying the session, unsetting the
session cookie, but nothing worked, the session is always continued with
the same SessionID.
What can i do to destroy the session?

tks
Jens

--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







> Why destroying it "before" a user logs in? Isn't it

In case the user did not log out properly, his session would still be marked
as valid & logged in

> better to start the session "after" a successful login?

starting works fine, restarting is the problem

> And then destroying the session when the user logs out.

You can't count on an explicit logout,
never rely on the users, they just don't act like you want them to ;)

cu
Jens
--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de






Hi,

how about setting a expiry time for the cookie. Like
45 min after logging in or whatever suits your needs.

You could use session_set_cookie_params() and set
the cookie lifetime to 0. That would at least prevent a login after
the browser window is closed.

Your site is nice by the way.

cheers
Johannes
--
Grüße aus dem schönen Tübingen
Johannes Janson ;)

"Jens Kisters" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why destroying it "before" a user logs in? Isn't it

In case the user did not log out properly, his session would still be marked
as valid & logged in

> better to start the session "after" a successful login?

starting works fine, restarting is the problem

> And then destroying the session when the user logs out.

You can't count on an explicit logout,
never rely on the users, they just don't act like you want them to ;)

cu
Jens
--
Grüße aus dem schönen Kleve
Jens Kisters

rosomm et partner
Agentur für neue Medien GmbH
Dienstleistungszentrum am
Weißen Tor - Eingang B
Gocher Landstrasse 2
47551 Kleve / Bedburg-Hau

Telefon: 02821 - 97856-20
Telefax: 02821 - 97856-77
[EMAIL PROTECTED]
http://www.rosomm-partner.de



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]








> The input from the search form is $searchtext.  The Returned
> Search data is
> $searchdata.
>
> <?
>
> $sql = "SELECT searchdata FROM table WHERE searchdata LIKE
> '%$searchtext'";
> $result = @mysql_query($sql, $connection)
>     or die (mysql_error());
>
> $num = mysql_num_rows($result);
>
> $x = 0;
>
> if ($num == 0) {
>     echo "No results";
> } else {
>
>     while($row = mysql_fetch_array($result)) {
>         $searchdata = $row['searchdata'];
>
>         $x++;
>
>         $searchdata = eregi_replace("$searchtext", "<font
> color=\"#FF0000\">$searchtext</font>", $searchdata);
>
>         echo "$x. $searchdata";
>
>     }
>
> }
>
> ?>
>
> Make sense?  And does it help?

Hi James

Yes and no.

I've got it to do that but what if the user enters more than one word?
I need to be able to loop inside the while for each word to be able to
highlight it. I think!
The problem is if someone enters a word which is used within the
hightlighting code. ie. font in your example.
This would then hightlight this again and screw the resulting code.

M@





Hi James

I'll paste the code I use..

$string = search string entered in the text box.
#############################################################
// REPLACE SPACES FOR MULTIWORD SEARCH
$string = str_replace(" ","%",$string);

$db->query("SELECT title,description FROM files WHERE (title LIKE
'%$string%') || (description LIKE '%$string%')");
        // SPLIT THE SEARCH INTO PARTS FOR HIGHLIGHTING
        $bg = explode("%",$string);
        while($db->next_record())
        {
                $title = $db->f("title");
                $des = $db->f("description");
                for($z=0; $z <  count($bg); $z++)
                {
                        // reset the array if it's at the end
                        if(next($bg) == false)
                        {
                                reset($bg);
                        }
                $bgstring = current($bg);
                $title = preg_replace("/($bgstring+)/ie", "'<span
class=message>\\1</span>'", $title);
                $des = preg_replace ("/($bgstring+)/ie", "'<span
class=message>\\1</span>'", $des);
                }
                echo $title.NL;
                echo $des.NL.NL;

        }

###############################################################

The above code works as expected....except if I search for span and say
class;

now this will highlight span in the search string found from the database
but on the second run ie. hightlighting class, it will re-highlight the
<span>  in the span tags from the original pass.

Do you get what I mean??


preg_replace is used to keep the original case of the results as it's a case
insensitive search

I need to be able to replace only result that aren't enclosed in a class tag

Cheers

M@





Hi all
I have a form with the checkbox like this
<form>
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result)) 
     {
<input type="checkbox" name="$id" value="on">
     }
....submit button and stuffs here...
</form>

After I submit to next page, at next page, how do I check which check box is checked?
like this?

if ($id=="on") {
do something
}else{
do something
}

I did try this but did not work, what am i suppose to do to achieve this?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"





> After I submit to next page, at next page, how do I check which 
> check box is checked?
> like this?
> 
> if ($id=="on") {
> do something
> }else{
> do something
> }

Hi 

try this assuming you have no toher check boxes called $id

if(isset($id))
{
  do something
}else{
  do other
}

M@






Jacky wrote:
> 
> Hi all
> I have a form with the checkbox like this
> <form>
> $query="select id from foo";
> $result=($query,$con);
> while ($row = mysql_fetch_array($result))
>      {
> <input type="checkbox" name="$id" value="on">
>      }
> ....submit button and stuffs here...
> </form>

One possibility:
Add a hidden field in the form and write all names of the checkboxes in
it, separated by a semicolon, for example.
-----------------------------------------------------------------------------
<form>
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
{
<input type="checkbox" name="$id" value="on">
$names_of_checkboxes.=$id.";";
}
<input type="hidden" name="names_of_checkboxes" value="<? echo
$names_of_checkboxes; ?>">
 ....submit button and stuffs here...
 </form>
-------------------------------------------------------------------------------
Then, in the next page you just do following:
---------------------------------------------------------------------------
$checkboxes_names_array=explode(";",$names_of_checkboxes);
for($x=0;x<count($checkboxes_names_array);$x++)
{
    if($$checkboxes_names_array[$x]=="on")
        // box checked
}
-------------------------------------------------------------------------------

Robert




Hi all,
I still cannot get my problem sought out, pretty desparate here so decided
to post my question again.
Allow me to repeat my question again:
I have a form with the checkbox like this
<form>
<?php
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
     {
print("<input type="checkbox" name="$id" value="on">");
     }
....submit button and stuffs here...
?>
</form>

After I submit to next page, at next page, how do I check which check box is
checked?
I did try isset() and empty() to check if variable exist ( as shown below)
and did not work as the result always turn up to be "off"

   if((empty($id))=='true'){
        echo "off";
     }else{
       echo "on";
   }

And I also try
if(isset($id))
{
  ..do echo off here...
}else{
  ...do echo on....
}

And the result is always "off" as well.

Somene advice me to use $http_var_gets btu I could not find it from manaual,
is that the solution I need?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Jacky <[EMAIL PROTECTED]>
To: Chris Fry <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 2:57 PM
Subject: Re: [PHP] Variable variable


> I did look up in the manual for $HTTP_GET_VARS but could not find it? what
> is it? a function?
> sorry to ask this again, just try to find out how to use that.
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> ----- Original Message -----
> From: Chris Fry <[EMAIL PROTECTED]>
> To: Jacky <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 2:59 AM
> Subject: Re: [PHP] Variable variable
>
>
> > Sorry - thought you only had one! - it's late.
> >
> > To Name the checkboxes you need:
> > <?php
> > while (get records from db) {
> >     $id = id from record;
> > ?>
> >     <input type="checkbox" name ="<?php print $id; ?>">
> > <?php
> > }
> > ?>
> >
> > You would have to do a $HTTP_GET_VARS on the next page to find out which
> ones
> > exist.
> >
> > Then your select statement would be:
> >
> > $query = "select * from table where id IN ('comma delimited list of
> values')";
> >
> > Messy but do-able!
> >
> > Probably a better way - There usually is!
> >
> > Chris
> >
> > Jacky wrote:
> >
> > > so how do I check at the next page which one is checked?
> > > Jack
> > > [EMAIL PROTECTED]
> > > "There is nothing more rewarding than reaching the goal you set for
> > > yourself"
> > > ----- Original Message -----
> > > From: Chris Fry <[EMAIL PROTECTED]>
> > > To: Jacky <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, April 18, 2001 2:31 AM
> > > Subject: Re: [PHP] Variable variable
> > >
> > > > Jacky,
> > > >
> > > > You do not need the value. The variable $id will either exist (if
the
> user
> > > checked it) or not (if the user did not check it).
> > > >
> > > > Hope this helps.
> > > >
> > > > Chris
> > > >
> > > > Jacky wrote:
> > > >
> > > > > Hi all
> > > > > I have a form with check box and name of those checkboxes is
usuing
> > > variable lke this,
> > > > >
> > > > > <!-- I got the value $id from a table and looping them and assign
> them
> > > to the check box name-->
> > > > > <input type="checkbox" name ="$id" value="on">
> > > > >
> > > > > and when I submit the form to page foo.php4, at that page, I use
> > > Variable variable to call the value of the check box to see if it
> checked
> > > like this
> > > > >
> > > > > $quey = "select id from table";
> > > > > $result = ...... ( assumeing it is done and i got value for $id
for
> all
> > > records from table)
> > > > >
> > > > > if ($$id =="on"){
> > > > > echo "on";
> > > > > }else{
> > > > > echo "off";
> > > > > }
> > > > >
> > > > > It always returns echo "off", why is that?
> > > > > cheers
> > > > > Jack
> > > > > [EMAIL PROTECTED]
> > > > > "There is nothing more rewarding than reaching the goal you set
for
> > > yourself"
> > > >
> > > > --
> > > > Chris Fry
> > > > Quillsoft Pty Ltd
> > > > Specialists in Secure Internet Services and E-Commerce Solutions
> > > > 10 Gray Street
> > > > Kogarah
> > > > NSW  2217
> > > > Australia
> > > >
> > > > Phone: +61 2 9553 1691
> > > > Fax: +61 2 9553 1692
> > > > Mobile: 0419 414 323
> > > > eMail: [EMAIL PROTECTED]
> > > > http://www.quillsoft.com.au
> > > >
> > > > You can download our Public CA Certificate from:-
> > > > https://ca.secureanywhere.com/htdocs/cacert.crt
> > > >
> > > >
**********************************************************************
> > > >
> > > > This information contains confidential information intended only for
> > > > the use of the authorised recipient.  If you are not an authorised
> > > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > > > e-mail.
> > > > In this case, you should not read, print, re-transmit, store or act
> > > > in reliance on this e-mail or any attachments, and should destroy
all
> > > > copies of them.
> > > > This e-mail and any attachments may also contain copyright material
> > > > belonging to Quillsoft Pty Ltd.
> > > > The views expressed in this e-mail or attachments are the views of
> > > > the author and not the views of Quillsoft Pty Ltd.
> > > > You should only deal with the material contained in this e-mail if
> > > > you are authorised to do so.
> > > >
> > > > This notice should not be removed.
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> > --
> > Chris Fry
> > Quillsoft Pty Ltd
> > Specialists in Secure Internet Services and E-Commerce Solutions
> > 10 Gray Street
> > Kogarah
> > NSW  2217
> > Australia
> >
> > Phone: +61 2 9553 1691
> > Fax: +61 2 9553 1692
> > Mobile: 0419 414 323
> > eMail: [EMAIL PROTECTED]
> > http://www.quillsoft.com.au
> >
> > You can download our Public CA Certificate from:-
> > https://ca.secureanywhere.com/htdocs/cacert.crt
> >
> > **********************************************************************
> >
> > This information contains confidential information intended only for
> > the use of the authorised recipient.  If you are not an authorised
> > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > e-mail.
> > In this case, you should not read, print, re-transmit, store or act
> > in reliance on this e-mail or any attachments, and should destroy all
> > copies of them.
> > This e-mail and any attachments may also contain copyright material
> > belonging to Quillsoft Pty Ltd.
> > The views expressed in this e-mail or attachments are the views of
> > the author and not the views of Quillsoft Pty Ltd.
> > You should only deal with the material contained in this e-mail if
> > you are authorised to do so.
> >
> > This notice should not be removed.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Hello Jacky!

Try to echo the variable to see its value.

HTH



----- Original Message -----
From: "Jacky@lilst" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 10:19 PM
Subject: [PHP] to find out which checkbox is checked


> Hi all,
> I still cannot get my problem sought out, pretty desparate here so decided
> to post my question again.
> Allow me to repeat my question again:
> I have a form with the checkbox like this
> <form>
> <?php
> $query="select id from foo";
> $result=($query,$con);
> while ($row = mysql_fetch_array($result))
>      {
> print("<input type="checkbox" name="$id" value="on">");
>      }
> ....submit button and stuffs here...
> ?>
> </form>
>
> After I submit to next page, at next page, how do I check which check box
is
> checked?
> I did try isset() and empty() to check if variable exist ( as shown below)
> and did not work as the result always turn up to be "off"
>
>    if((empty($id))=='true'){
>         echo "off";
>      }else{
>        echo "on";
>    }
>
> And I also try
> if(isset($id))
> {
>   ..do echo off here...
> }else{
>   ...do echo on....
> }
>
> And the result is always "off" as well.
>
> Somene advice me to use $http_var_gets btu I could not find it from
manaual,
> is that the solution I need?
> cheers
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for
> yourself"
> ----- Original Message -----
> From: Jacky <[EMAIL PROTECTED]>
> To: Chris Fry <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 2:57 PM
> Subject: Re: [PHP] Variable variable
>
>
> > I did look up in the manual for $HTTP_GET_VARS but could not find it?
what
> > is it? a function?
> > sorry to ask this again, just try to find out how to use that.
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set for
> > yourself"
> > ----- Original Message -----
> > From: Chris Fry <[EMAIL PROTECTED]>
> > To: Jacky <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Wednesday, April 18, 2001 2:59 AM
> > Subject: Re: [PHP] Variable variable
> >
> >
> > > Sorry - thought you only had one! - it's late.
> > >
> > > To Name the checkboxes you need:
> > > <?php
> > > while (get records from db) {
> > >     $id = id from record;
> > > ?>
> > >     <input type="checkbox" name ="<?php print $id; ?>">
> > > <?php
> > > }
> > > ?>
> > >
> > > You would have to do a $HTTP_GET_VARS on the next page to find out
which
> > ones
> > > exist.
> > >
> > > Then your select statement would be:
> > >
> > > $query = "select * from table where id IN ('comma delimited list of
> > values')";
> > >
> > > Messy but do-able!
> > >
> > > Probably a better way - There usually is!
> > >
> > > Chris
> > >
> > > Jacky wrote:
> > >
> > > > so how do I check at the next page which one is checked?
> > > > Jack
> > > > [EMAIL PROTECTED]
> > > > "There is nothing more rewarding than reaching the goal you set for
> > > > yourself"
> > > > ----- Original Message -----
> > > > From: Chris Fry <[EMAIL PROTECTED]>
> > > > To: Jacky <[EMAIL PROTECTED]>
> > > > Cc: <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, April 18, 2001 2:31 AM
> > > > Subject: Re: [PHP] Variable variable
> > > >
> > > > > Jacky,
> > > > >
> > > > > You do not need the value. The variable $id will either exist (if
> the
> > user
> > > > checked it) or not (if the user did not check it).
> > > > >
> > > > > Hope this helps.
> > > > >
> > > > > Chris
> > > > >
> > > > > Jacky wrote:
> > > > >
> > > > > > Hi all
> > > > > > I have a form with check box and name of those checkboxes is
> usuing
> > > > variable lke this,
> > > > > >
> > > > > > <!-- I got the value $id from a table and looping them and
assign
> > them
> > > > to the check box name-->
> > > > > > <input type="checkbox" name ="$id" value="on">
> > > > > >
> > > > > > and when I submit the form to page foo.php4, at that page, I use
> > > > Variable variable to call the value of the check box to see if it
> > checked
> > > > like this
> > > > > >
> > > > > > $quey = "select id from table";
> > > > > > $result = ...... ( assumeing it is done and i got value for $id
> for
> > all
> > > > records from table)
> > > > > >
> > > > > > if ($$id =="on"){
> > > > > > echo "on";
> > > > > > }else{
> > > > > > echo "off";
> > > > > > }
> > > > > >
> > > > > > It always returns echo "off", why is that?
> > > > > > cheers
> > > > > > Jack
> > > > > > [EMAIL PROTECTED]
> > > > > > "There is nothing more rewarding than reaching the goal you set
> for
> > > > yourself"
> > > > >
> > > > > --
> > > > > Chris Fry
> > > > > Quillsoft Pty Ltd
> > > > > Specialists in Secure Internet Services and E-Commerce Solutions
> > > > > 10 Gray Street
> > > > > Kogarah
> > > > > NSW  2217
> > > > > Australia
> > > > >
> > > > > Phone: +61 2 9553 1691
> > > > > Fax: +61 2 9553 1692
> > > > > Mobile: 0419 414 323
> > > > > eMail: [EMAIL PROTECTED]
> > > > > http://www.quillsoft.com.au
> > > > >
> > > > > You can download our Public CA Certificate from:-
> > > > > https://ca.secureanywhere.com/htdocs/cacert.crt
> > > > >
> > > > >
> **********************************************************************
> > > > >
> > > > > This information contains confidential information intended only
for
> > > > > the use of the authorised recipient.  If you are not an authorised
> > > > > recipient of this e-mail, please contact Quillsoft Pty Ltd by
return
> > > > > e-mail.
> > > > > In this case, you should not read, print, re-transmit, store or
act
> > > > > in reliance on this e-mail or any attachments, and should destroy
> all
> > > > > copies of them.
> > > > > This e-mail and any attachments may also contain copyright
material
> > > > > belonging to Quillsoft Pty Ltd.
> > > > > The views expressed in this e-mail or attachments are the views of
> > > > > the author and not the views of Quillsoft Pty Ltd.
> > > > > You should only deal with the material contained in this e-mail if
> > > > > you are authorised to do so.
> > > > >
> > > > > This notice should not be removed.
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > >
> > > --
> > > Chris Fry
> > > Quillsoft Pty Ltd
> > > Specialists in Secure Internet Services and E-Commerce Solutions
> > > 10 Gray Street
> > > Kogarah
> > > NSW  2217
> > > Australia
> > >
> > > Phone: +61 2 9553 1691
> > > Fax: +61 2 9553 1692
> > > Mobile: 0419 414 323
> > > eMail: [EMAIL PROTECTED]
> > > http://www.quillsoft.com.au
> > >
> > > You can download our Public CA Certificate from:-
> > > https://ca.secureanywhere.com/htdocs/cacert.crt
> > >
> > > **********************************************************************
> > >
> > > This information contains confidential information intended only for
> > > the use of the authorised recipient.  If you are not an authorised
> > > recipient of this e-mail, please contact Quillsoft Pty Ltd by return
> > > e-mail.
> > > In this case, you should not read, print, re-transmit, store or act
> > > in reliance on this e-mail or any attachments, and should destroy all
> > > copies of them.
> > > This e-mail and any attachments may also contain copyright material
> > > belonging to Quillsoft Pty Ltd.
> > > The views expressed in this e-mail or attachments are the views of
> > > the author and not the views of Quillsoft Pty Ltd.
> > > You should only deal with the material contained in this e-mail if
> > > you are authorised to do so.
> > >
> > > This notice should not be removed.
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





No. Just point your links to https://www.yoursecureserver.com/dir/page.htm
or, if your SSL is on another port, to
https://www.yoursecureserver.com:otherportnumber/dir/page.htm.

cu, Jens




> -----Ursprüngliche Nachricht-----
> Von: phpman [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 17. April 2001 22:56
> An: [EMAIL PROTECTED]
> Betreff: SSL SSL SSL SSL -- READ THIS!!!!!!
>
>
> How do I establish an SSL socket connection with PHP?
> I have PHP compiled in an Apache Mod_SSL server. Do I need to compile PHP
> with
> some sort of open_ssl option? I have --enable-sockets in the command line.
> Please help!!!
>
> -dave
>
>
>
>
>
>
>
>
>






----- Original Message -----
From: "phpman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 4:55 PM
Subject: [PHP] SSL SSL SSL SSL -- READ THIS!!!!!!


> How do I establish an SSL socket connection with PHP?
> I have PHP compiled in an Apache Mod_SSL server. Do I need to compile PHP
> with
> some sort of open_ssl option? I have --enable-sockets in the command line.
> Please help!!!
>
> -dave
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





So sprach Joseph Blythe am Wed, Apr 18, 2001 at 10:48:14AM +0930:
> Hey,
> 
> Why doesn't HTTP_POST_VARS work inside functions?
> 
> ---somefile.php - forms action ---
> 
> function foo() {
>        reset($HTTP_POST_VARS);

Because this particular HTTP_POST_VARS is not the HTTP_POST_VARS you have
outside the function.  Either you pass it along as a parameter, or you do:

global $HTTP_POST_VARS;

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 1 day 10 hours 18 minutes




So sprach Nando2 am Mon, Apr 16, 2001 at 03:28:11PM -0300:
> Can anyone remind me of that?

(raw)urlencode

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 1 day 10 hours 23 minutes




So sprach Dddogbruce (@home.com) am Mon, Apr 16, 2001 at 03:12:25PM -0700:
> <?
> $greeting = "Hello!"
> echo "$greeting"
> ?>

Since I also have this problem, I tried your suggestion, and it didn't work. 
However, I expected this, because apache doesn't know which interpreter to
use to exec this script.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 1 day 10 hours 24 minutes




> Is there a php equivalent for the use of ` (I think) in Unix/Perl? So for example 
>echo "`$x++`" would first evaluate $x++ and then print the resulting value.
> 
> Euan Greig
> Technical Consultant
> BRANN DATA
> [EMAIL PROTECTED]
> 01285 645997
> 
> 
> 


**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************




echo ++$x;

http://www.php.net/manual/en/language.operators.increment.php



> > Is there a php equivalent for the use of ` (I think) in Unix/Perl? So
for example echo "`$x++`" would first evaluate $x++ and then print the
resulting value.
> >
> > Euan Greig
> > Technical Consultant
> > BRANN DATA
> > [EMAIL PROTECTED]
> > 01285 645997







I deliberately gave a simple example, perhaps too simple.  I want to output quite long 
and complicated strings that may involve evaluated variables, calls to functions etc. 
But I also want it to as legible as possible. But even something simple along the 
lines I quoted gives me problems. See the following code and its output

<?php
$test=1;
echo $test++ . "<BR>";
echo $test++ . "<BR>";

$test=1;
echo "Value of test: $test++ <BR>";
echo "Value of test: $test++ <BR>";
?>

The output:

1
2
Value of test: 1++ 
Value of test: 1++ 

In the second set of code lines, what I need to do is somehow bracket off the $test++ 
so it is evaluated before being echoed.

Euan


-----Original Message-----
From: Jason Brooke [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 09:46
To: Greig, Euan; [EMAIL PROTECTED]
Subject: Re: [PHP] php equivalent for `command`


echo ++$x;

http://www.php.net/manual/en/language.operators.increment.php



> > Is there a php equivalent for the use of ` (I think) in Unix/Perl? So
for example echo "`$x++`" would first evaluate $x++ and then print the
resulting value.
> >
> > Euan Greig
> > Technical Consultant
> > BRANN DATA
> > [EMAIL PROTECTED]
> > 01285 645997




**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************




> In the second set of code lines, what I need to do is somehow bracket off
the $test++ so it is evaluated before being echoed.

You need to use the string concantenation operator (a period) to use things
like $test++, else PHP get's confused.

> echo "Value of test: $test++ <BR>";

To get that to work like you want it to, you need only do:

echo 'Value of test: ' . $test++ . ' <BR>';

It's functionally the same, no brackets needed. If you want it to be
evaluated BEFORE it's echoed, you need to use:

echo 'Value of test: ' . ++$test . ' <BR>';


--
Plutarck
Should be working on something...
...but forgot what it was.



""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I deliberately gave a simple example, perhaps too simple.  I want to
output quite long and complicated strings that may involve evaluated
variables, calls to functions etc. But I also want it to as legible as
possible. But even something simple along the lines I quoted gives me
problems. See the following code and its output
>
> <?php
> $test=1;
> echo $test++ . "<BR>";
> echo $test++ . "<BR>";
>
> $test=1;
> echo "Value of test: $test++ <BR>";
> echo "Value of test: $test++ <BR>";
> ?>
>
> The output:
>
> 1
> 2
> Value of test: 1++
> Value of test: 1++
>
> In the second set of code lines, what I need to do is somehow bracket off
the $test++ so it is evaluated before being echoed.
>
> Euan
>
>
> -----Original Message-----
> From: Jason Brooke [mailto:[EMAIL PROTECTED]]
> Sent: 18 April 2001 09:46
> To: Greig, Euan; [EMAIL PROTECTED]
> Subject: Re: [PHP] php equivalent for `command`
>
>
> echo ++$x;
>
> http://www.php.net/manual/en/language.operators.increment.php
>
>
>
> > > Is there a php equivalent for the use of ` (I think) in Unix/Perl? So
> for example echo "`$x++`" would first evaluate $x++ and then print the
> resulting value.
> > >
> > > Euan Greig
> > > Technical Consultant
> > > BRANN DATA
> > > [EMAIL PROTECTED]
> > > 01285 645997
>
>
>
>
> **************************************************************************
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi all,
Extremely desparate here as I still cannot get my problem sought out, so decided
to post my question again.
Allow me to repeat my question again:
I have a form with the checkbox like this
<form>
<?php
$query="select id from foo";
$result=($query,$con);
while ($row = mysql_fetch_array($result))
     {
print("<input type="checkbox" name="$id" value="on">");
     }
....submit button and stuffs here...
?>
</form>

After I tried check on few checkboxes and submit to next page, at next page, how do I 
check which check box is
checked so that I can get value of the checked one to process to next step?
I did try isset() and empty() to check if variable exist ( as shown below)
and did not work as the result always turn up to be "off"

   if((empty($id))=='true'){
        echo "off";
     }else{
       echo "on";
   }

And I also try
if(isset($id))
{
  ..do echo off here...
}else{
  ...do echo on....
}

And the result is always "off" as well.

Somene advice me to use $http_var_gets btu I could not find it from manaual,
is that the solution I need?
cheers

Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




Hi Jacky

In it's simpliest form try this
###################################
<form action="<?= $PHP_SELF; ?>" method="get">
<input type="checkbox" name="id"><br/>
<input type="submit" name="submit" value="submit">

</form>
<?php
echo (isset($id)) ? "checked" : "not checked";
?>
##################################



>
> Hi all,
> Extremely desparate here as I still cannot get my problem sought
> out, so decided
> to post my question again.
> Allow me to repeat my question again:
> I have a form with the checkbox like this
> <form>
> <?php
> $query="select id from foo";
> $result=($query,$con);
> while ($row = mysql_fetch_array($result))
>      {
> print("<input type="checkbox" name="$id" value="on">");
>      }
> ....submit button and stuffs here...
> ?>
> </form>

<input type="checkbox" name="$id" value="on">

>
> After I tried check on few checkboxes and submit to next page, at
> next page, how do I check which check box is
> checked so that I can get value of the checked one to process to
> next step?
> I did try isset() and empty() to check if variable exist ( as shown below)
> and did not work as the result always turn up to be "off"
>
>    if((empty($id))=='true'){
>         echo "off";
>      }else{
>        echo "on";
>    }
>
> And I also try
> if(isset($id))
> {
>   ..do echo off here...
> }else{
>   ...do echo on....
> }
>
> And the result is always "off" as well.
>
> Somene advice me to use $http_var_gets btu I could not find it
> from manaual,
> is that the solution I need?
> cheers
>
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set
> for yourself"
>





If a checkbox is NOT checked, the attached PHP variable is NOT set.  Only if
it
is checked will you be able to see/query the variable "id"

Using isset() should allow to you see the boolean state of a checkbox, or
using
the "value" component after you do an isset() call will give you the
specifics.

'Luck
-Szii

----- Original Message -----
From: Matt Williams <[EMAIL PROTECTED]>
To: Jacky <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 2:26 AM
Subject: RE: [PHP] how do I find out which checkbox is checked when form get
submit


> Hi Jacky
>
> In it's simpliest form try this
> ###################################
> <form action="<?= $PHP_SELF; ?>" method="get">
> <input type="checkbox" name="id"><br/>
> <input type="submit" name="submit" value="submit">
>
> </form>
> <?php
> echo (isset($id)) ? "checked" : "not checked";
> ?>
> ##################################
>
>
>
> >
> > Hi all,
> > Extremely desparate here as I still cannot get my problem sought
> > out, so decided
> > to post my question again.
> > Allow me to repeat my question again:
> > I have a form with the checkbox like this
> > <form>
> > <?php
> > $query="select id from foo";
> > $result=($query,$con);
> > while ($row = mysql_fetch_array($result))
> >      {
> > print("<input type="checkbox" name="$id" value="on">");
> >      }
> > ....submit button and stuffs here...
> > ?>
> > </form>
>
> <input type="checkbox" name="$id" value="on">
>
> >
> > After I tried check on few checkboxes and submit to next page, at
> > next page, how do I check which check box is
> > checked so that I can get value of the checked one to process to
> > next step?
> > I did try isset() and empty() to check if variable exist ( as shown
below)
> > and did not work as the result always turn up to be "off"
> >
> >    if((empty($id))=='true'){
> >         echo "off";
> >      }else{
> >        echo "on";
> >    }
> >
> > And I also try
> > if(isset($id))
> > {
> >   ..do echo off here...
> > }else{
> >   ...do echo on....
> > }
> >
> > And the result is always "off" as well.
> >
> > Somene advice me to use $http_var_gets btu I could not find it
> > from manaual,
> > is that the solution I need?
> > cheers
> >
> > Jack
> > [EMAIL PROTECTED]
> > "There is nothing more rewarding than reaching the goal you set
> > for yourself"
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






Dear All,

    I wonder if there is a php function that could return content
of an array, in print_r style, as a string. I need to get it and
send as debug information. If not, is there a workaround or
alternative, other than writing a function? Many thanks.

Chien-pin





Try:


function getStringFromObj($prmObjIn)
{
        ob_start(); 
        var_dump($prmObjIn); 
        $output = ob_get_contents(); 
        ob_end_clean();

        return $output;
}

I grabbed this from user comments somewhere on php.net. It works a treat.

-----Original Message-----
From: Chien-pin Wang [mailto:[EMAIL PROTECTED]]
Sent: 18 April 2001 05:02
To: [EMAIL PROTECTED]
Subject: [PHP] print_r style array content



Dear All,

    I wonder if there is a php function that could return content
of an array, in print_r style, as a string. I need to get it and
send as debug information. If not, is there a workaround or
alternative, other than writing a function? Many thanks.

Chien-pin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







On Wednesday 18 April 2001 06:01, you wrote:
> Dear All,
>
>     I wonder if there is a php function that could return content
> of an array, in print_r style, as a string. I need to get it and
> send as debug information. If not, is there a workaround or
> alternative, other than writing a function? Many thanks.

serialize ()

A bit hard to read, but really useful nevertheless

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

AAAAA - American Association Against Acronym Abuse




I get this error

Fatal error: Call to undefined function: shm_attach() in
/usr/local/apache/phplib/ct_shm.inc on line 31

Here is my compile parameter
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-config-file-path=/usr/local/apache/conf' '--enable-versioning'
'--with-ldap' '--with-xml' '--enable-bcmath' '--with-database'
'--enable-ftp' '--with-gd=/usr/local/gd1.3' '--enable-bcmath'
'--disable-debug' '--enable-memory-limit=yes' '--enable-track-vars'

Can anyone tell me why the library can find the standard shm_attach()?

thanx,

Patrick






I would like to query a postgresql db with the php language.
Today I wrote a script (connectandquery.php) performing the following : 
- connect to the DB : $conn = pg_Connect("dbname = foo");
- execute the query : $res = pg_Exec($conn,"SELECT * from BAR");


But I would like to write this in two scripts :
- connect.php : $conn = pg_Connect("dbname = foo");
- query.php : $res = pg_Exec($conn,"SELECT * from BAR");

but I don't know how to get the $conn variable (defined in connect.php) in
the script query.php.

Any idea is welcome !





Hi,

put: include("connect.php"); at the beginning of query.php.

Johannes

""Picard, Cyril"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I would like to query a postgresql db with the php language.
> Today I wrote a script (connectandquery.php) performing the following :
> - connect to the DB : $conn = pg_Connect("dbname = foo");
> - execute the query : $res = pg_Exec($conn,"SELECT * from BAR");
>
>
> But I would like to write this in two scripts :
> - connect.php : $conn = pg_Connect("dbname = foo");
> - query.php : $res = pg_Exec($conn,"SELECT * from BAR");
>
> but I don't know how to get the $conn variable (defined in connect.php) in
> the script query.php.
>
> Any idea is welcome !
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






include will help me to organize my scripts, but it will effectively
establish the connection each time I perform the query.
I would like to establish the connection one time, and then to be able to
perform many queries using this connection.
I've been told that i could declare $conn as global in both script : 
-- connect.php:
   global $conn;
   $conn = pg_connect ...

-- query.php:
   global $conn;
   $res = pg_exec( $conn, ... 

What do you think about this way ?

> -----Message d'origine-----
> De:   Johannes Janson [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 12:42
> À:    [EMAIL PROTECTED]
> Objet:        Re: [PHP] Connection to postgresql DB used by 2 scripts ?
> 
> Hi,
> 
> put: include("connect.php"); at the beginning of query.php.
> 
> Johannes
> 
> ""Picard, Cyril"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I would like to query a postgresql db with the php language.
> > Today I wrote a script (connectandquery.php) performing the following :
> > - connect to the DB : $conn = pg_Connect("dbname = foo");
> > - execute the query : $res = pg_Exec($conn,"SELECT * from BAR");
> >
> >
> > But I would like to write this in two scripts :
> > - connect.php : $conn = pg_Connect("dbname = foo");
> > - query.php : $res = pg_Exec($conn,"SELECT * from BAR");
> >
> > but I don't know how to get the $conn variable (defined in connect.php)
> in
> > the script query.php.
> >
> > Any idea is welcome !
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I think you're misunderstanding what include actually does.

Let's say we have a file called db.php, with the contents:

<?php
$conn = pg_connect();
?>

Now, if the contents of your other script are:

<?php
include (db.php);
?>

It is the same as having the contents:

<?php
$conn = pg_connect();
?>


When you execute a query with pg_exec you are using the current connection,
not establishing a new one.

There is no reason to use the global keyword to access the value of $conn,
unless you are trying to access $conn inside of the function.


I believe you are looking for the persistant connection function, in that
you don't have to open a new connection for every time the script is run.
However, you must still make a call to pg_pconnect before you attempt to
query your database.


Anyway, using include while not open a new connection for each query. But it
will open a new connection for each time the page is visited.


--
Plutarck
Should be working on something...
...but forgot what it was.



""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
include will help me to organize my scripts, but it will effectively
establish the connection each time I perform the query.
I would like to establish the connection one time, and then to be able to
perform many queries using this connection.
I've been told that i could declare $conn as global in both script :
-- connect.php:
   global $conn;
   $conn = pg_connect ...

-- query.php:
   global $conn;
   $res = pg_exec( $conn, ...

What do you think about this way ?

> -----Message d'origine-----
> De: Johannes Janson [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 12:42
> À: [EMAIL PROTECTED]
> Objet: Re: [PHP] Connection to postgresql DB used by 2 scripts ?
>
> Hi,
>
> put: include("connect.php"); at the beginning of query.php.
>
> Johannes
>
> ""Picard, Cyril"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I would like to query a postgresql db with the php language.
> > Today I wrote a script (connectandquery.php) performing the following :
> > - connect to the DB : $conn = pg_Connect("dbname = foo");
> > - execute the query : $res = pg_Exec($conn,"SELECT * from BAR");
> >
> >
> > But I would like to write this in two scripts :
> > - connect.php : $conn = pg_Connect("dbname = foo");
> > - query.php : $res = pg_Exec($conn,"SELECT * from BAR");
> >
> > but I don't know how to get the $conn variable (defined in connect.php)
> in
> > the script query.php.
> >
> > Any idea is welcome !
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







i'm trying to use sessions with my project, but it seems that registered
variables in a session aren't global by default.
It doesn't even seem like the session is global, because if I reference the
sessionid (which only shows up if cookies are disabled)
    by using <?=SID?>, it shows up within a function, if I reference it from
within the function.

if anyone can help me make my variables (such as $user, and $active)
globally registered with the session, I would be very grateful.
maybe its the cookie not being global, that would explain why the sessionid
shows up only from within a function (but not in the global scope)

thanks
ben
[EMAIL PROTECTED]







Rather than bothering with SID whos existance is uncertain, use the variable
$PHPSESSID. It's set whenever you use session_start, to my knowledge.

The simplest method, and the only one I am aware of, of accessing session
variables globally is by explicitly declaring them global in your function.
It's also the best way to do it, as it may take extra typing when declaring
your function, but it makes it alot more readable and bug-free.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Ben"" <[EMAIL PROTECTED]> wrote in message
9bjn4n$41c$[EMAIL PROTECTED]">news:9bjn4n$41c$[EMAIL PROTECTED]...
> i'm trying to use sessions with my project, but it seems that registered
> variables in a session aren't global by default.
> It doesn't even seem like the session is global, because if I reference
the
> sessionid (which only shows up if cookies are disabled)
>     by using <?=SID?>, it shows up within a function, if I reference it
from
> within the function.
>
> if anyone can help me make my variables (such as $user, and $active)
> globally registered with the session, I would be very grateful.
> maybe its the cookie not being global, that would explain why the
sessionid
> shows up only from within a function (but not in the global scope)
>
> thanks
> ben
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Can anyone tell me what is cookiesand how i can use it

Thank

TACHAGO





RTFM (ReadTheFineManual ;)

http://us.php.net/manual/en/function.setcookie.php

As listed in the manual for an explanation on cookies:

http://www.netscape.com/newsref/std/cookie_spec.html



--
Plutarck
Should be working on something...
...but forgot what it was.


"Bertrand TACHAGO" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can anyone tell me what is cookiesand how i can use it
>
> Thank
>
> TACHAGO
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi

I have the following code

$fp=fopen($agentcode.date("m-d-Y-g-i-s").'CyberTrac.ctr', "w");
fwrite($fp,"$agentcode etc etc");

$fc = fopen($fp, 'rb');
        $attachment = fread($fc , filesize($filename));
        fclose($fc);

$mail = new html_mime_mail('X-Mailer: Html Mime Mail Class');
$mail->add_attachment($attachment, $agentcode.date("m-d-Y-g-i-s").'CyberTrac.ctr', 
'application/octet-stream');

The file is successfuly created. When it is attatched to the email however the size is 
written as 0 bytes, the filename is the same though. If I check the file on the server 
side it s perfectly ok, any ideas?

TIA
Wade






> mt_srand ((double) microtime() * 1000000);


Thanks alot, I will use the upper one... Perhaps decrease it abit ;)


> Note: one way to auto-logout someone is to use something like a on_unload
> javascript procedure, but don't bother. Not worth the hassle and it's
isn't
> fool-proof.

Nopp, tried that. It loggs out every time you change site, and I don't use
frames. I intend to use frames, so when the main frame is closed, that means
that the whole shit is closed. But now, I switch sites constantly, without
frames.

But still, with frames, our trick would work.

- Richard






I want do create Images dynamicly, i have a High Color png but after
CreateImagefrompng() it have only 256 colors. What can i do?

thx
 Nils






Don't use GD.  You need either the new GD2 extension or the Imlib2
extension from http://mmcc.cx/php_imlib/

-Rasmus

On Wed, 18 Apr 2001, Nils Sondermann wrote:

> I want do create Images dynamicly, i have a High Color png but after
> CreateImagefrompng() it have only 256 colors. What can i do?
>
> thx
>  Nils
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Don't forget take a look at dev-list archive, there are many useful posts how to compile with gd2. -- Yasuo Ohgaki ""Nils Sondermann"" <[EMAIL PROTECTED]> wrote in message 9bjthb$fu2$[EMAIL PROTECTED]">news:9bjthb$fu2$[EMAIL PROTECTED]... > I want do create Images dynamicly, i have a High Color png but after > CreateImagefrompng() it have only 256 colors. What can i do? > > thx > Nils > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



On Tuesday 17 April 2001 15:56, you wrote:
> > Easy. Just use fopen('http://localhost/file.asp')  then fread
> > the data you want.  I do this technique to read Access tables
> > from a Linux box.
>
> But that gives you the RESULTS of the ASP script, not the script
> itself.

fopen ("/path/to/asp/script.asp", "r");

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

AAAAA - American Association Against Acronym Abuse




Hi,

I have question about regular expressions; I don't know anything
about it and was wondering if someone could help me out.

I have this text:

"[ this is atest ] and this is the rest of the text"

I want to get the text inbetween the [ and ].

If someone could help me out, i would appreciate it.
A link to a tuturial would also be nice.

Regards,

Jeroen Geusebroek





At 13:39 18-4-2001 +0200, Jeroen Geusebroek wrote:
>Hi,
>
>I have question about regular expressions; I don't know anything
>about it and was wondering if someone could help me out.
>
>I have this text:
>
>"[ this is atest ] and this is the rest of the text"

$data = "[ this is a test ] and this is the rest of the text"
if (preg_match('"\[([^\]]+)\]"', $data, $match)) {
         var_dump($match[1])
}

>I want to get the text inbetween the [ and ].
>
>If someone could help me out, i would appreciate it.
>A link to a tuturial would also be nice.
>
>Regards,
>
>Jeroen Geusebroek
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





On Wednesday 18 April 2001 13:39, you wrote:

> I have this text:
>
> "[ this is atest ] and this is the rest of the text"
>
> I want to get the text inbetween the [ and ].

if (preg_match ('/\[([^\]])\]/', $Subject, $Matches)) {
  echo "Found it : '" . $Matches [1] . "'";
}

looks a bit perverse (because the [] brackets have special meaning in 
regular expressions), but you'll get used to it :)

Also have a look at the description of the perl regex syntax in the manual

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Even idiots can handle computers, and many do.




On Wednesday 18 April 2001 17:07, you wrote:
> On Wednesday 18 April 2001 13:39, you wrote:
> > I have this text:
> >
> > "[ this is atest ] and this is the rest of the text"
> >
> > I want to get the text inbetween the [ and ].
>
> if (preg_match ('/\[([^\]])\]/', $Subject, $Matches)) {
>   echo "Found it : '" . $Matches [1] . "'";
> }

Ooops. The expression should read '/\[([^\]]+)\]/'

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Even idiots can handle computers, and many do.




On Tuesday 17 April 2001 16:28, you wrote:
> Yes... I'm not familiar with sessions. This should be like this ? :
>
> In connect.php :
> <?php
> session_start();
> $connect = pg_pConnect("blablabla");
> session_register("connect");
> <A HREF="query.php?<?=SID"?>clique ici</?>
> ?>

Simply using pg_pconnect() (without saving the connection ID) should be 
just as fast and more failproof

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

AAAAA - American Association Against Acronym Abuse




hummm... I don't know how to use pg_pconnect()... It returns a connection
ID, isn't it ? And I have to use this connection ID later ? 
I would like to reuse this connection ID to another script... and the
problem is here :(

I feel that I ignore something so important that I'm stopped and so trivial
that you do not think about it !

> -----Message d'origine-----
> De:   Christian Reiniger [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 13:40
> À:    [EMAIL PROTECTED]
> Objet:        Re: [PHP] Persistent connection & many scripts ?
> 
> On Tuesday 17 April 2001 16:28, you wrote:
> > Yes... I'm not familiar with sessions. This should be like this ? :
> >
> > In connect.php :
> > <?php
> > session_start();
> > $connect = pg_pConnect("blablabla");
> > session_register("connect");
> > <A HREF="query.php?<?=SID"?>clique ici</?>
> > ?>
> 
> Simply using pg_pconnect() (without saving the connection ID) should be 
> just as fast and more failproof
> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> AAAAA - American Association Against Acronym Abuse
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Nope, you don't need to save the ID. PHP/database does the work of
remembering what the ID of your persistant connection is.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
hummm... I don't know how to use pg_pconnect()... It returns a connection
ID, isn't it ? And I have to use this connection ID later ?
I would like to reuse this connection ID to another script... and the
problem is here :(

I feel that I ignore something so important that I'm stopped and so trivial
that you do not think about it !

> -----Message d'origine-----
> De: Christian Reiniger [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 13:40
> À: [EMAIL PROTECTED]
> Objet: Re: [PHP] Persistent connection & many scripts ?
>
> On Tuesday 17 April 2001 16:28, you wrote:
> > Yes... I'm not familiar with sessions. This should be like this ? :
> >
> > In connect.php :
> > <?php
> > session_start();
> > $connect = pg_pConnect("blablabla");
> > session_register("connect");
> > <A HREF="query.php?<?=SID"?>clique ici</?>
> > ?>
>
> Simply using pg_pconnect() (without saving the connection ID) should be
> just as fast and more failproof
>
> --
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
>
> AAAAA - American Association Against Acronym Abuse
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







So :
<?php
        $conn = pg_pConnect("dbname=foo");
        $res = pg_Exec($conn, "SELECT * FROM BAR");
        $conn = pg_pConnect("dbname=foo"); // Here PHP/database will
automagically find a persistent connection and reuse it ?
        $res = pg_Exec($conn,"SELECT * FROM XYZ");

?>

Is it what you mean ? 

PS : I understand that my code here is not very usefull ;-)

> -----Message d'origine-----
> De:   Plutarck [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 15:57
> À:    [EMAIL PROTECTED]
> Objet:        Re: [PHP] Persistent connection & many scripts ?
> 
> Nope, you don't need to save the ID. PHP/database does the work of
> remembering what the ID of your persistant connection is.
> 
> 
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
> 
> 
> ""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hummm... I don't know how to use pg_pconnect()... It returns a connection
> ID, isn't it ? And I have to use this connection ID later ?
> I would like to reuse this connection ID to another script... and the
> problem is here :(
> 
> I feel that I ignore something so important that I'm stopped and so
> trivial
> that you do not think about it !
> 
> > -----Message d'origine-----
> > De: Christian Reiniger [SMTP:[EMAIL PROTECTED]]
> > Date: mercredi 18 avril 2001 13:40
> > À: [EMAIL PROTECTED]
> > Objet: Re: [PHP] Persistent connection & many scripts ?
> >
> > On Tuesday 17 April 2001 16:28, you wrote:
> > > Yes... I'm not familiar with sessions. This should be like this ? :
> > >
> > > In connect.php :
> > > <?php
> > > session_start();
> > > $connect = pg_pConnect("blablabla");
> > > session_register("connect");
> > > <A HREF="query.php?<?=SID"?>clique ici</?>
> > > ?>
> >
> > Simply using pg_pconnect() (without saving the connection ID) should be
> > just as fast and more failproof
> >
> > --
> > Christian Reiniger
> > LGDC Webmaster (http://sunsite.dk/lgdc/)
> >
> > AAAAA - American Association Against Acronym Abuse
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Well I've never actually made two calls to connect in one script, but what
happens on the second one is PHP notices you already have a connection open,
and instead of establishing a new one it just returns the current connection
ID.

On your first call to pconnect, PHP looks for any persistant connections
that are available to it.

If it finds one it returns the ID of it to your script, which is really
fast. But if it doesn't find a connection, it creates a new one and returns
that.

Two connects or two pconnects in the same script will work the exact same
way, but one connect and one pconnect won't do exactly what you might think
it would.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
So :
<?php
$conn = pg_pConnect("dbname=foo");
$res = pg_Exec($conn, "SELECT * FROM BAR");
$conn = pg_pConnect("dbname=foo"); // Here PHP/database will
automagically find a persistent connection and reuse it ?
$res = pg_Exec($conn,"SELECT * FROM XYZ");

?>

Is it what you mean ?

PS : I understand that my code here is not very usefull ;-)

> -----Message d'origine-----
> De: Plutarck [SMTP:[EMAIL PROTECTED]]
> Date: mercredi 18 avril 2001 15:57
> À: [EMAIL PROTECTED]
> Objet: Re: [PHP] Persistent connection & many scripts ?
>
> Nope, you don't need to save the ID. PHP/database does the work of
> remembering what the ID of your persistant connection is.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Picard, Cyril"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hummm... I don't know how to use pg_pconnect()... It returns a connection
> ID, isn't it ? And I have to use this connection ID later ?
> I would like to reuse this connection ID to another script... and the
> problem is here :(
>
> I feel that I ignore something so important that I'm stopped and so
> trivial
> that you do not think about it !
>
> > -----Message d'origine-----
> > De: Christian Reiniger [SMTP:[EMAIL PROTECTED]]
> > Date: mercredi 18 avril 2001 13:40
> > À: [EMAIL PROTECTED]
> > Objet: Re: [PHP] Persistent connection & many scripts ?
> >
> > On Tuesday 17 April 2001 16:28, you wrote:
> > > Yes... I'm not familiar with sessions. This should be like this ? :
> > >
> > > In connect.php :
> > > <?php
> > > session_start();
> > > $connect = pg_pConnect("blablabla");
> > > session_register("connect");
> > > <A HREF="query.php?<?=SID"?>clique ici</?>
> > > ?>
> >
> > Simply using pg_pconnect() (without saving the connection ID) should be
> > just as fast and more failproof
> >
> > --
> > Christian Reiniger
> > LGDC Webmaster (http://sunsite.dk/lgdc/)
> >
> > AAAAA - American Association Against Acronym Abuse
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







(Learning from my last mistake, I'll now try to make clear right away what
each sentence means *G*)

Introductory lines:
I want to write a FastCGI compatible PHP script.  In order to do so, PHP
obviously need to recompile PHP with '--with-fastcgi'.  However, looking at
some PERL FastCGI scripts, I see that they mainly consist of a while loop
like this:

while( FCGI::accept() >= 0 ) {
        foo();
        FCGI::flush();
}

Questions:
What are the PHP equivalents to FCGI::accept() and FCGI::flush()?  


Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 1 day 1 hour 7 minutes




Use file() to read the file up into an array (we'll call it $array).

Then I would personally use:

foreach ($array as $val)
{
     trim($val);
     $arr = explode("\t", $val); // "\t" means tab, but it will not work if
it's only spaces instead of a real tab

     $stock_name = $arr[0];
     $stock_desc = $arr[1];
     $stock_length = $arr[2];
     $stock_qty = $arr[3];
     $stock_price = $arr[4];

     // Do your insert/update SQL query right here, before the ending
bracket.

}


There you go. Now inside that loop you have 5 variables with the values they
should have, ready for you to do whatever you'd like with them.

If your wondering, trim() is used to remove the newline characters and
extraneous spaces from the begining and end of the string. As long as they
are using an actual "tab" button between each piece of data, and only ONE
tab, it works.

Tell me if this works for you. If it doesn't I can rethink it :)


--
Plutarck
Should be working on something...
...but forgot what it was.

"Chris Aitken" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Everyone,
>
> Ive been asked to do a task here at my work and its something ive never
> done before. I was hoping you guys could point me in the right direction
so
> I can research some more and discover how in the hell im gonna do this :)
>
> Basically, I have been issued a TAB delimited text file which I need to
> process and insert all the data into a table. Here is a basic example of
> what I need to do..........
>
> Say the text file had the following lines (thousands of them, 1 record per
> line)
>
> Screw   Big     12      200     1.99
> Screw   Big     10      400     1.50
>
> And I wanted to import each line into a table (Mysql DB) that had 6 fields
> (5 for each of the above plus an autoincremented ID field
>
> stock_id
> stock_name
> stock_desc
> stock_length
> stock_qty
> stock_price
>
>
> Any suggestions and direction pointing will be greatly appreciated.
>
>
>
>
> --
>        Chris Aitken - Webmaster/Database Designer - IDEAL Internet
> email: [EMAIL PROTECTED]  phone: +61 2 4628 8888  fax: +61 2 4628 8890
>              --------------------------------------------
>
>        Unix -- because a computer's a terrible thing to waste!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi all,

I'd like to know if there is any vulnerability with PHP 4.0.4 pl1 running on 
IIS servers.

Regards,

Alessandro.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





>I'd like to know if there is any vulnerability with PHP 4.0.4 pl1 running
on
>IIS servers.
None that I'm aware of that are due to php, unless you write silly scripts
which allow access to things they shouldn't. There are probably uncountable
NT vulnerabilities though. One which recently frightened me was that if you
append +.htr to a requested URL (eg www.mydomain.com/myphpfile.php  - or
indeed myaspfile.asp) on a standard setup you get the script source complete
with any passwords you were unwise enough to put in there. Easily fixed by
removing the .htr script mapping in the internet service manager, but
frightening to find out you've been running your servers for several years
whilst unaware of the problem.

Cheer
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





i'm trying to use sessions with my project, but it seems that registered
variables in a session aren't global by default.
It doesn't even seem like the session is global, because if I reference the
sessionid (which only shows up if cookies are disabled)
    by using <?=SID?>, it shows up within a function, if I reference it from
within the function.

if anyone can help me make my variables (such as $user, and $active)
globally registered with the session, I would be very grateful.
maybe its the cookie not being global, that would explain why the sessionid
shows up only from within a function (but not in the global scope)

so...i guess my question is how can i globalize a session?

thanks
ben
[EMAIL PROTECTED]








If you want to access a global variable in a function, it must be declared
"GLOBAL". Otherwise PHP's local scope would be totally useless.

If you want to access a variable inside of a function, you must explicitly
declare it as global.

There are a few exceptions such as $GLOBALS, but they should not be relied
on.

If nothing else, not using global in a function that requires a variable
that is declared outside of that function is bad practice.


Note: Try using get_defined_variables() inside of a function and see what it
returns.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Ben"" <[EMAIL PROTECTED]> wrote in message
9bjvo1$irv$[EMAIL PROTECTED]">news:9bjvo1$irv$[EMAIL PROTECTED]...
> i'm trying to use sessions with my project, but it seems that registered
> variables in a session aren't global by default.
> It doesn't even seem like the session is global, because if I reference
the
> sessionid (which only shows up if cookies are disabled)
>     by using <?=SID?>, it shows up within a function, if I reference it
from
> within the function.
>
> if anyone can help me make my variables (such as $user, and $active)
> globally registered with the session, I would be very grateful.
> maybe its the cookie not being global, that would explain why the
sessionid
> shows up only from within a function (but not in the global scope)
>
> so...i guess my question is how can i globalize a session?
>
> thanks
> ben
> [EMAIL PROTECTED]
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






1. there are no multi-dimensional arrays in php, just single dimension
arrays each element of which may be an array (or any other variable type).
If you make every element of an array an array of size x, you will get what
can be used as a multi-dimensional array. But if you forget what it really
is, you'll run into problems like expecting to be able to sort
$array[$x][$y] by $y.
2. because of this you can have as many levels of an array as you want.

try :
$array[][][][] = "fred";
foreach($array as $level1)
        foreach($level1 as $level2)
                foreach($level2 as $level3)
                        foreach($level3 as $value)
                                echo($value);

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Plutarck [mailto:[EMAIL PROTECTED]]
> Sent: 17 April 2001 17:42
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Is there such an array like $array[][]?
> 
> 
> PHP can be a tad screwy with how it handles multi-dimensional 
> arrays, but
> yes PHP handles them. No real speed problems with them either.
> 
> But you may just want to use an associative array like:
> 
> $loc = array("y" => $y, "x" => $x);
> 
> Then just use $loc["y"] and $loc["x"].
> 
> Just another option, but feel free to use multi-dimensional 
> arrays. Just be
> aware that PHP supports only two dimensions (so $array[][][] 
> will not work),
> and if you try and get fancy with sort() and count() you are 
> going to give
> yourself a migraine.
> 
> 
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
> 
> 
> "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > yes, that's a multi-dimensional array, which is fine in php (and
> > everything else i can think of =P)...
> >
> > -jack
> >
> > Scott Fletcher wrote:
> > >
> > > Hi!  I am wondering if there is such a php array that can 
> take care of
> the x
> > > and y axis data.  I figure that using this array type, 
> $axis[$x][$y]
> would
> > > do the trick.  Would it work?  If not, then education me 
> on what would
> work!
> > > Thanks!
> > >
> > > Scott
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> >
> 
> 
> 




Ensure your database name as listed in either mysql_select_db or
mysql_db_query is valid.

After that, it's probably a GRANT problem. Make sure the username/password
pair is correct, first of all, and check the privileges of that user.

My guess is that either the DB name is incorrect, or the user does not have
access to that database.


--
Plutarck
Should be working on something...
...but forgot what it was.


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Greetings,
>
> This is a mysql question, (but I'm using php with it).
>
> Most everything is working correctly; however, when
> I hit one button I get:
> Database error: cannot use database xxxxxx
> MySQL Error: 0 ()
> Session halted.
>
> What should I be looking for?  Is this a user/password
> problem?  Is this a GRANT problem?
>
> Any help here would be appreciated.
>
> Thanks!
>
>
>
>
> Max Pyziur                                     BRAMA - Gateway Ukraine
> [EMAIL PROTECTED]                                  http://www.brama.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi.

I've installed unixODBC (2.0.5) and then compiled php (4.0.4pl1 and latest
CVS) with --with-unixodbc=/www/unixodbc. Suprisingly, when I noticed that
there is:

Fatal error: Call to undefined function: odbc_connect() in
/www/virtual/firebird/common/pre.php on line 25

Can anybody explained me why this happend? Did I forget to compile sometghin
in?

'./configure' '--with-prefix=/www/php' '--with-apxs=/www/apache/bin/apxs'
'--with-pgsql=/www/pgsql/' '--with-sigchild' '--with-memory-limit'
'--with-config-file-path=/www/php/conf' '--enable-wddx' '--enable-xml'
'--with-mysql=/www/mysql' '--with-unixodbc=/www/unixodbc/'

Przem










Replying to myself...the first sign of madness.

I found the solution, which was hidden characters in the text file, which
was confusing javascript.



""Dave Mateer"" <[EMAIL PROTECTED]> wrote in message
9bf1v5$4iq$[EMAIL PROTECTED]">news:9bf1v5$4iq$[EMAIL PROTECTED]...
> Happy Easter to all!
>
> In the user viewer example at the end of Chapter 12 - has anyone had
> problems with the source downloaded from their website?
>
> The story so far with my trials of this example:
>
> downloaded source
> created table in mysql and populated it (with the SQL script provided)
>
> First page ie function list_records() works 'fine'.  Except a javascript
> error at the foot of the page - page done, with errors.  Sorting
hyperlinks
> all work, as does all the forward, reverse paging.
>
> What doesn't work is the function view_record() hyperlinks.
>
> I believe things are going awry in javascript (of which I know nothing,
and
> have the dummies guide in front of me) as it doesn't get to opening a new
> window.
>
> I've tried calling the function as follows:
>
> <a href="javascript:open_window('www.google.com');">Google</a>
>
> No joy at all - javascript error.
>
> <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
>    <!--
>    function open_window(url) {
>       var NEW_WIN = null;
>       NEW_WIN = window.open ("", "RecordViewer",
>                              "toolbar=no,width="+
>                              <?php echo $new_win_width ?>+
>                              ",height="+<?php echo $new_win_height?>+
>                              ",directories=no,status=no,
>                              scrollbars=yes,resize=no,menubar=no");
>       NEW_WIN.location.href = url;
>    }
>    //-->
>    </SCRIPT>
>
> Any help greatly received.  Grrrrrrr  I'm trying to learn php, not hack
> javascript...
>
>
> David Mateer.
> [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi,
Does anyone know if php stores POST variable names as well as values? I'm
using HTTP_POST_VARS for the values but I'm having to create my own array
for the names.

cheers,

Mat






Hi,

this will list all your posted variables with name and
the posted value.

while (list($key, $value)=each($HTTP_POST_VARS) ) {
            echo "$key = $value <br>";
}

Johannes

""Mat Marlow"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bk11q$dvq$[EMAIL PROTECTED]">news:9bk11q$dvq$[EMAIL PROTECTED]...
> Hi,
> Does anyone know if php stores POST variable names as well as values? I'm
> using HTTP_POST_VARS for the values but I'm having to create my own array
> for the names.
>
> cheers,
>
> Mat
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Mat Marlow wrote:
> 
> Hi,
> Does anyone know if php stores POST variable names as well as values? I'm
> using HTTP_POST_VARS for the values but I'm having to create my own array
> for the names.
> 
> cheers,
> 
> Mat
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Correct me if I misunderstand you're question, but;

If you use HTTP_POST_VARS you already have the variable names. I
mean... how else do you use the values you're talking about?
$HTTP_POST_VARS{"var_1"}, $HTTP_POST_VARS{"var_2"}, etc.
var_1 and var_2 are the variable names...
-- 

* R&zE:

***************************
**  Renze Munnik
**
**  E: [EMAIL PROTECTED]
**  M: +31 6 218 111 43
***************************




Quick answer: HTTP_POST_VARS is an associative array. The "name" of the
submitted variables are the keys, and the value of the element is the value
that was submitted.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Mat Marlow"" <[EMAIL PROTECTED]> wrote in message
9bk11q$dvq$[EMAIL PROTECTED]">news:9bk11q$dvq$[EMAIL PROTECTED]...
> Hi,
> Does anyone know if php stores POST variable names as well as values? I'm
> using HTTP_POST_VARS for the values but I'm having to create my own array
> for the names.
>
> cheers,
>
> Mat
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






> >> >Ok, I found out what the problem was.  I'm still curious
> >> >why the problem is occuring.
> >> >> if( $tmpArray[errorNumber] & $typesToDisplay ) {  
> >> you're using the bitwise & when you want the logical &&
> >No, I actually wanted to use the bitwise &.  I wanted to see
> >if the "errorNumber" was in $typesToDisplay.
> without seeing the code I would guess you should be using in_array().

Except that $typesToDisplay is not an array.  It is made up of
something like this:

$typesToDisplay = ( 1 | 2 | 4 | 8 | 32 | 64 );

And to see if the errorNumber is part of the above, you bitwise
"&" it.

Chris




Hi

I'm using wddx_deserialize($packet) and what I'm getting returned does not
seem right in the slightest

my code is:

$values = wddx_deserialize($packet);

Packet:
<wddxPacket version='1.0'><header></header><data><recordset rowCount='2'
fieldNames='Title,description,bondref'><field name='Title'><string>Senior
Legal Adviser</string><string>Head of Litigation</string></field><field
name='description'><string>blah blah blah</string><string>blah blah
blah</string></field><field
name='bondref'><number>234</number><number>236</number></field></recordset><
/data></wddxPacket>

when I run wddx_deserialize on my packet, I'm getting a string with the
contents "Senior Legal Adviser"

i.e. the first value of the first field

I was expecting a nice associative array, what am I doing wrong?

FWIW the packet is coming through fine

regs
--
Darren Beale
Web Developer
Vardus Ltd  - www.vardus.com
+44 (0) 20 7471 8899





I ' m trying to develop a page that exports data to a Palm ,my question is
,can i do this with PHP or with JavaScript ? .If it's possible please let me
know ,thnks

Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A





"exporting data to a palm" is far too vague.

PHP can produce data in a format suitable for saving on a Palm, or you can
have it interpret data from a Palm. To physically save data from a webpage
to a palm requires client-side scripting.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Renzi, Sebastian"" <[EMAIL PROTECTED]> wrote in message
A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01">news:A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01...
I ' m trying to develop a page that exports data to a Palm ,my question is
,can i do this with PHP or with JavaScript ? .If it's possible please let me
know ,thnks

Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







Thank you ,where i can download more info about this ?

> -----Mensaje original-----
> De:   Plutarck [SMTP:[EMAIL PROTECTED]]
> Enviado el:   miércoles 18 de abril de 2001 10:42
> Para: [EMAIL PROTECTED]
> Asunto:       Re: [PHP] Connection with a Palm
> 
> "exporting data to a palm" is far too vague.
> 
> PHP can produce data in a format suitable for saving on a Palm, or you can
> have it interpret data from a Palm. To physically save data from a webpage
> to a palm requires client-side scripting.
> 
> 
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
> 
> 
> ""Renzi, Sebastian"" <[EMAIL PROTECTED]> wrote in message
> A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01">news:A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01...
> I ' m trying to develop a page that exports data to a Palm ,my question is
> ,can i do this with PHP or with JavaScript ? .If it's possible please let
> me
> know ,thnks
> 
> Sebastián Renzi
> Consultoría & Desarrollo de Sistemas.
> CODES S.A
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hm...can't say I've seen many subjects about this, but you might want to
look around for information on WAP/WML.

Maybe someone else would know more though, because I have no experiance with
non-PC browsers.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Renzi, Sebastian"" <[EMAIL PROTECTED]> wrote in message
A1581797259FD211B25E00805FCBC1FA1E4C1D@SRV_DES_01">news:A1581797259FD211B25E00805FCBC1FA1E4C1D@SRV_DES_01...
Thank you ,where i can download more info about this ?

> -----Mensaje original-----
> De: Plutarck [SMTP:[EMAIL PROTECTED]]
> Enviado el: miércoles 18 de abril de 2001 10:42
> Para: [EMAIL PROTECTED]
> Asunto: Re: [PHP] Connection with a Palm
>
> "exporting data to a palm" is far too vague.
>
> PHP can produce data in a format suitable for saving on a Palm, or you can
> have it interpret data from a Palm. To physically save data from a webpage
> to a palm requires client-side scripting.
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Renzi, Sebastian"" <[EMAIL PROTECTED]> wrote in message
> A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01">news:A1581797259FD211B25E00805FCBC1FA1E4C1C@SRV_DES_01...
> I ' m trying to develop a page that exports data to a Palm ,my question is
> ,can i do this with PHP or with JavaScript ? .If it's possible please let
> me
> know ,thnks
>
> Sebastián Renzi
> Consultoría & Desarrollo de Sistemas.
> CODES S.A
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







  Hi!  I don't understand why PHP is having trouble with the odbc_exec.  Is
there a bug in PHP code?  Here's what the error messages said!

  "SQL error: [OpenLink][ODBC][Driver]No key columns found for table
referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect".

  This show that it had to do with primary (or secondary) keys or index
issues.  I'm using MS-SQL Sever and this table I'm using in the database
have primary key already!

  So, what can I do to fix it?  I need it to be working.  When I use the
Linux odbctest command and it execute without a problem.  So, it is obvious
the problem lie with PHP code, odbc_exec();

Thanks,
 Scott






[From BugDB] ID: 10375 Updated by: kalowsky Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Reproduceable crash PHP Version: 4.0.4pl1 Assigned To: Comments: fixed in cvs, will not be in 4.0.5, but later releases. Previous Comments: --------------------------------------------------------------------------- [2001-04-18 08:23:59] [EMAIL PROTECTED] Documentation tells me that odbc_autocommit can be called with one or two parameters. (Without the OnOff parameter, this function returns auto-commit status for connection_id. ) Calling with two parameters works, with one I get a crash. I'm using ODBC 3.520.5303.2 against a Access 2000 database with Access ODBC driver 4.00.5303.01 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10375&edit=2 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] You may find other bugs in BugDB. Regards, -- Yasuo Ohgaki ""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message 9bk5j8$iks$[EMAIL PROTECTED]">news:9bk5j8$iks$[EMAIL PROTECTED]... > Hi! I don't understand why PHP is having trouble with the odbc_exec. Is > there a bug in PHP code? Here's what the error messages said! > > "SQL error: [OpenLink][ODBC][Driver]No key columns found for table > referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect". > > This show that it had to do with primary (or secondary) keys or index > issues. I'm using MS-SQL Sever and this table I'm using in the database > have primary key already! > > So, what can I do to fix it? I need it to be working. When I use the > Linux odbctest command and it execute without a problem. So, it is obvious > the problem lie with PHP code, odbc_exec(); > > Thanks, > Scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



Scott,

This error indicates that there is no index/primary key on a table that the
result set is coming from - and PHP has told the driver read the result set
into a into a cursor (which requires a primary key).

Adding a primary key to the table will fix this, or passing a different
cursor type - keyset driven cursors are essentially 'sliding windows' - they
read a set of rows in, and then scroll back and forth.  Upon reaching the
end of the set, they grab the next keyset in the direction of scroll, etc.

Alternatively, instead of adding the primary key, you can disable "#define
HAVE_SQL_EXTENDED_FETCH 1 " in php_odbc.h and recompile.  This will prevent
PHP from atomatically setting a cursor.

Best regards,
Andrew
--------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
Universal Data Access Integration
http://www.openlinksw.com

> -----Original Message-----
> From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 9:37 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] New problem with PHP "odbc_exec".
>
>
>   Hi!  I don't understand why PHP is having trouble with the
> odbc_exec.  Is
> there a bug in PHP code?  Here's what the error messages said!
>
>   "SQL error: [OpenLink][ODBC][Driver]No key columns found for table
> referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect".
>
>   This show that it had to do with primary (or secondary) keys or index
> issues.  I'm using MS-SQL Sever and this table I'm using in the database
> have primary key already!
>
>   So, what can I do to fix it?  I need it to be working.  When I use the
> Linux odbctest command and it execute without a problem.  So, it
> is obvious
> the problem lie with PHP code, odbc_exec();
>
> Thanks,
>  Scott
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Hi,

Recently I noticed e-mails on this list about Imlib2 and GD2 extensions
which I was not aware of. So I started to wander if there are more
extensions working with PHP which allows graphic process (the only one I
knew was GD). Is it? If so, is it possible to use these extensions on all
platforms (which PHP supports) and with all web servers?

Thanks!


Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

------------------------------------------
Phone:       (+354) 4615501
Mobile:      (+354) 8960376
Fax:         (+354) 4615503
E-mail:      [EMAIL PROTECTED]
Homepage:    www.sed.is <- New Homepage!
------------------------------------------





hi

i installed php with this "config" on rh6.2..
'./configure' '--with-mysql' '--with-apache=../apache_1.3.19' '--enable-trak-vars' 
'--with-xml' '--with-wddx'

and a phpinfo(); show me this too...

but when i try to use anny wddx function i get this message...

Fatal error:  Call to undefined function:  wddx_serialize_value() in
/usr/local/apache/htdocs/xml/xml.php on line 2 -- 

annybody have a idea whats wrong ?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Markus Maussner
Application Development and Operations
DISTEFORA Mobile (Germany) GmbH
Amsinckstrasse 69
D-20097 Hamburg
T: +49 (0) 40 80 80 99 - 904
F: +49 (0) 40 80 80 99 - 502
E: [EMAIL PROTECTED]
W: www.distefora.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





hi...

sorry i found the error myself... it shoube be --enable-wddx and not --with-wddx

markus

Am Mit, 18 Apr 2001 schrieb Markus Maussner:
> hi
> 
> i installed php with this "config" on rh6.2..
> './configure' '--with-mysql' '--with-apache=../apache_1.3.19' '--enable-trak-vars' 
>'--with-xml' '--with-wddx'
> 
> and a phpinfo(); show me this too...
> 
> but when i try to use anny wddx function i get this message...
> 
> Fatal error:  Call to undefined function:  wddx_serialize_value() in
> /usr/local/apache/htdocs/xml/xml.php on line 2 -- 
> 
> annybody have a idea whats wrong ?
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Markus Maussner
> Application Development and Operations
> DISTEFORA Mobile (Germany) GmbH
> Amsinckstrasse 69
> D-20097 Hamburg
> T: +49 (0) 40 80 80 99 - 904
> F: +49 (0) 40 80 80 99 - 502
> E: [EMAIL PROTECTED]
> W: www.distefora.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Markus Maussner
Application Development and Operations
DISTEFORA Mobile (Germany) GmbH
Amsinckstrasse 69
D-20097 Hamburg
T: +49 (0) 40 80 80 99 - 904
F: +49 (0) 40 80 80 99 - 502
E: [EMAIL PROTECTED]
W: www.distefora.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





I have not managed to get IE to download my file on the fly as suggested.
so I was wondering if there are any other suggestions on how I can create a
temp file for download and after the download is complete the file is
deleted.

thanks

randy




Instead of:
header("Content-disposition: filename=backup.csv");
try
header('Content-Disposition: attachment; filename=backup.csv');

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]







NO SALES PITCH, NO PRESSURE, NO NOTHING. 

Just the best non-tackified grip enhancer you'll ever use for your golf game, 
GUARANTEED, or your money back.

 From football's #1 specialty product company, SUPAGRIP25 is now available to golf 
enthusiasts everywhere.
 
Click here 
http://www.creativefootball.com
 to see the product that is taking all sports (where a good grip is essential) by 
storm! 

While you're there be sure to check out our "who uses our products" page, what you see 
just might surprise you. 
You really didn't think they make those great catches on talent alone, did you? 


Transmissions to you by the sender of 'this' email will be stopped promptly by sending 
an e-mail with "unsubscribe" in the subject line. Simply hit reply and send and we 
will remove you from our database. Please Note-This is a one time mailing.Thank you.




whoever the mail admin is should start using rblsmtpd :-)

~kurth





Php 4.04pl1 running on a linux box.  When putting up some filters for the
box, I ran into an interesting issue.  I put up the filter to allow all
traffic from the php box to the database box.  I run isql and get a
connect just fine.  I run a php report and it dies without connecting to
the database.  Without the filters, all is well and nothing  seems wrong.

Has anyone else had similar troubles?

--Robert




Hello all,

I have integrated a simple text based poll script in my homepage.
But I want get the survey results in a popup window, if somebody votes.

How can I make that?

Moh


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Hi:
You can use JavaScript for a popup window. Look up for window.open()
function. You can pass the result to that output from PHP script.

Seung-woo Nam

Mohamedou wrote:
> 
> Hello all,
> 
> I have integrated a simple text based poll script in my homepage.
> But I want get the survey results in a popup window, if somebody votes.
> 
> How can I make that?
> 
> Moh
>





I've read through:

http://php.net/manual/pt_BR/features.file-upload.put-method.php

I added:

Script PUT /put.php

to my apache config file ... everything as far as Netscape Composer is
concerned looks right, but it isn't working.

I changed my put.php script so that it output all ENV variables to a log
file:

===========
<?
 $fp = fopen("/tmp/log.txt","w+");
 $temp="PHP_PUT_FILENAME: $PHP_UPLOADED_FILE_NAME\n";
 $vars = get_defined_vars();
 foreach ($vars as $test => $value) {
  if (is_array($value)) {
   foreach ($value as $subtest => $subvalue) {
    $temp .= "$subtest: $subvalue\n";
   }
  } else {
   $temp .= "$test: $value\n";
  }
 }
 fwrite($fp, $temp);
 $temp="DOCUMENT_ROOT: $DOCUMENT_ROOT\n";
 fwrite($fp, $temp);
 $temp="REQUEST_URI: $REQUEST_URI\n";
 fwrite($fp, $temp);
 fclose($fp);
?>
============

But PHP_PUT_FILENAME isn't being set:

=======================
hub# grep PUT update/log.txt
PHP_PUT_FILENAME:
REQUEST_METHOD: PUT
REQUEST_METHOD: PUT
temp: PHP_PUT_FILENAME:
hub# grep FILE update/log.txt
PHP_PUT_FILENAME:
SCRIPT_FILENAME: /home/vhosts/farelist.com/www/put.php
SCRIPT_FILENAME: /home/vhosts/farelist.com/www/put.php
temp: PHP_PUT_FILENAME:
hub# grep ^PHP update/log.txt
PHP_PUT_FILENAME:
PHP_SELF: /put.php/test/Untitled.htm2
PHP_SELF: /put.php/test/Untitled.htm2
======================

Am I missing something obvious here?

Thanks ...

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: [EMAIL PROTECTED]           secondary: scrappy@{freebsd|postgresql}.org





I am using the following function to send out emails via PHP:

function SendEMail( $to, $subject, $body ) {
        $additionalHeaders = "MIME-Version: 1.0\n";
                $additionalHeaders .= "Content-type: text/html; 
charset=\"iso-8859-1\"\n";
        $additionalHeaders .= "Content-Transfer-Encoding: 7bit\n";
        $additionalHeaders .= "Return-path:[EMAIL PROTECTED]\n";
        $additionalHeaders .= "Reply-To:[EMAIL PROTECTED]\n";
        $additionalHeaders .= "Sender:[EMAIL PROTECTED]\n";

        mail( $to, $subject, $body, "From: [EMAIL PROTECTED]\n" . 
$additionalHeaders );
}

This way I get consistent headers...

However, when I actually get the emails here are the headers I get:

Envelope-to: [EMAIL PROTECTED]
Delivery-date: Wed, 18 Apr 2001 12:49:29 -0400
Received: from nobody by artemis.jtlnet.com with local (Exim 3.20 #1)
          id 14pv8z-0004VT-00
          for [EMAIL PROTECTED]; Wed, 18 Apr 2001 12:49:29 -0400
To: [EMAIL PROTECTED]
Subject: [TCE] - Confirmation Required
From: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Reply-To: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
Sender: Nobody <[EMAIL PROTECTED]>
Date: Wed, 18 Apr 2001 12:49:29 -0400

Notice the Sender element does not reflect what I've sent, showing Nobody 
instead.  My hosting provider states it's because their upstream demanded 
them to set it up this way to prevent spam emails...

Is this accurate?  If not, what can I tell my ISP to change how emails are 
sent out?






How about actually using distinct?

SELECT DISTINCT(email_addr) FROM myTable WHERE x = 1

--Toby

----- Original Message ----- 
From: "Jason Caldwell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:47 AM
Subject: [PHP] mySQL Question....


> if i perform a SELECT query (say) like the following:
> 
> SELECT email_addr FROM myTable WHERE x = 1
> 
> in this query i want to pull-out (or list) all email addresses where x
> equals 1, however, suppose i don't want any duplicate email addresses...
> 
> would i use ORDER BY and COUNT(*) to get listing of non-duplicate email
> addresses, and just ignore the COUNT() ?
> 
> Thanks.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





 
can someone give a quick hint as to why this does not work:
 
$array = split ("\n", $contents);
$stuff = array_count_values ($array); 
echo $stuff[nuts];
 
or even:
 
$array = array (split ("\n", $contents));
$stuff = array_count_values ($array); 
echo $stuff[nuts];
 
 
thnx...
 
matthew




Has anyone here ever had to work with a
Reynolds and Reynolds system ? they make
auto dealer management software. It is a
closed system, but apparently sites like
autotrader.com access them from various
dealers to extract inventory data...autotrader
appears to use jsp, so I assume that I can
use php as well. if any one has any experience
with anything remotely like this, please let me know

Thanks,

Jerry Lake            - [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online     - http://www.pacifier.com


-----Original Message-----
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 4:59 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Importing Data from Text File


Use file() to read the file up into an array (we'll call it $array).

Then I would personally use:

foreach ($array as $val)
{
     trim($val);
     $arr = explode("\t", $val); // "\t" means tab, but it will not work if
it's only spaces instead of a real tab

     $stock_name = $arr[0];
     $stock_desc = $arr[1];
     $stock_length = $arr[2];
     $stock_qty = $arr[3];
     $stock_price = $arr[4];

     // Do your insert/update SQL query right here, before the ending
bracket.

}


There you go. Now inside that loop you have 5 variables with the values they
should have, ready for you to do whatever you'd like with them.

If your wondering, trim() is used to remove the newline characters and
extraneous spaces from the begining and end of the string. As long as they
are using an actual "tab" button between each piece of data, and only ONE
tab, it works.

Tell me if this works for you. If it doesn't I can rethink it :)


--
Plutarck
Should be working on something...
...but forgot what it was.

"Chris Aitken" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Everyone,
>
> Ive been asked to do a task here at my work and its something ive never
> done before. I was hoping you guys could point me in the right direction
so
> I can research some more and discover how in the hell im gonna do this :)
>
> Basically, I have been issued a TAB delimited text file which I need to
> process and insert all the data into a table. Here is a basic example of
> what I need to do..........
>
> Say the text file had the following lines (thousands of them, 1 record per
> line)
>
> Screw   Big     12      200     1.99
> Screw   Big     10      400     1.50
>
> And I wanted to import each line into a table (Mysql DB) that had 6 fields
> (5 for each of the above plus an autoincremented ID field
>
> stock_id
> stock_name
> stock_desc
> stock_length
> stock_qty
> stock_price
>
>
> Any suggestions and direction pointing will be greatly appreciated.
>
>
>
>
> --
>        Chris Aitken - Webmaster/Database Designer - IDEAL Internet
> email: [EMAIL PROTECTED]  phone: +61 2 4628 8888  fax: +61 2 4628 8890
>              --------------------------------------------
>
>        Unix -- because a computer's a terrible thing to waste!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



Reply via email to