[PHP] Re: Passing a variable invisibly via a href?

2002-04-02 Thread kodrik
Daniel alsén wrote: > Hi, > > i need to pass a variable by letting the user click on a link. Right now i > do it like: page.php?variable=value > > However, i don?t want the variable, and it?s value to appear in the adress > bar of the browser. And i don?t want people to be able to pass the same

Re: [PHP] Variable names

2002-04-02 Thread kodrik
> function somefunction($myvar) { > do something... > ... > ... > return \$myvar; > } > > $varname = somefunction($myvar); > echo "$varname"; That won't work, because you escaped the $ sign, the variable won't get processed and the name returned w

[PHP] Variable names

2002-04-02 Thread kodrik
If I have a variable, how do I extract the name of the variable. In principle: $varname=somefunction($myvar); The value of $varname is then "myvar" How do I do it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: [PHP-DB] [newbie] passing variables

2001-11-19 Thread Kodrik
you have You have twice "action" and are missing the "method". In your case, I guess it would be "get". I didn't read on, so you might have more errors. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: [PHP] Re: Error: Can't redeclare already declared function (PHP 3.0.15)

2001-10-27 Thread Kodrik
I include files in each other all the time, and some of them might call the same functions (like database functions). I just use a string in all function declaration with the name of the functions or set of functions in the file. if(!$function_test) { $function_test=1; function test() { d

Re: [PHP] GD Copying Images

2001-10-26 Thread Kodrik
On Friday 26 October 2001 05:03 am, you wrote: > I have 2 images, and I want to copy/reescale a block from image A to image > B, when I do it (imagecopyresized) I get a gray square on image B, I think > that the problem is palette colors, how can I copy palette from image A to > image B? > > > >

Re: [PHP] authentication help

2001-10-25 Thread Kodrik
"thename" and $pass<>"thepass") { tothis } else { dothat } -- 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] Zork!

2001-10-25 Thread Kodrik
I wrote a php pipe that allows people to play Zork from their browser http://phpzork.com Zork is a 20 years old command based adventure games. One of the first and most popular. It's source code was released. Many of us here should remember it. For those who don't know how to play, just type y

Re: [PHP] = 0 and = "0"

2001-10-25 Thread Kodrik
Check the link I posted. http://24.234.52.166 There is the code I wrote and it's output. The two lines print. You can explain me why tomorrow they print on my server and not yours. Good night > > But his two lines still don't need typecasting, they both work: > > http://24.234.52.166 > > I don't

Re: [PHP] = 0 and = "0"

2001-10-25 Thread Kodrik
You are right, "0" didn't show as a value. But his two lines still don't need typecasting, they both work: http://24.234.52.166 -- 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 admi

Re: [PHP] talking directly w/ MySql

2001-10-25 Thread Kodrik
> how can i issue such statments w/o opening a connection? I you don't open a connection, how is mysql supposed to know which db you are talking to? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] = 0 and = "0"

2001-10-25 Thread Kodrik
> > If you set $qty=0; then $qty has no value. > > Of course it has a value. No it doesn't have a value. PHP interprets 0 as null. A very easy way for you to check: $value=0; if(!$value) printf("$value doesn't have a value (it didn't even print 0)\n"); $value="0" if($value) printf("$value

Re: [PHP] = 0 and = "0"

2001-10-25 Thread Kodrik
I just tested those two lines with php 4.0.6 and they both work. There is a difference though. If you set $qty=0; then $qty has no value. But if you set $qty="0", it has a value. Type casting is irrelevant in php. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [

Re: [PHP] Regex problem

2001-10-25 Thread Kodrik
> My solution: > ereg("^[:space:]*\*",$variable) Try ereg("^[:space:]\**$",$variable) or ereg("^[ ]*\**$",$variable) or ereg("^[[:space:]]*\**$",$variable) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: [PHP] Enabling php in only certain hosts and directories

2001-10-24 Thread Kodrik
Well, php runs the same as apache, so whatever apache can access, php can access. So any files with the db passwords that need to be accessed by php, can be seen by all users who can upload php scripts to your server. In the case of virtual hosting. So trust people you give access, even limite

Re: [PHP] redirecting the browser

2001-10-24 Thread Kodrik
I got some thread mixed up. Ignore that answer. > No, he wants to launch a script after Javascript has processed. > PHP is run on the server, Javascript on the client so Javascript has to run > after PHp is finished. > For him to launch a Javascript code, he can only do it by contacting the > ser

Re: [PHP] Check mail user

2001-10-24 Thread Kodrik
Like this? function checkmail ($email) { if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z][a-z][a-z]?$", $email, $check)) { if (checkdnsrr(substr(strstr($check[0], '@'), 1), "ANY")) { return TRUE; } } return FALSE; } On Wednesday 24 October 2001 03:24 am, R

Re: [PHP] OnUNload Scripts

2001-10-24 Thread Kodrik
> >You could open a new window, give focus to the current window, and in the > >new window, have it close itself after it's finished processing. An invisible frame is the easiest: mailto:[EMAIL PROTECTED]] > > >Sent: Wednesday, October 24, 2001 4:16 PM > >To: [EMAIL PROTECTED] > >Subject: [PHP] O

Re: [PHP] Using A Query Results Multiple Times

2001-10-24 Thread Kodrik
Checkout sqltools at: http://zc8.com/zc8/ZC8news/shownews.php?articleid=98 It has many fucntions for mysql within php. They should work with php3. On Wednesday 24 October 2001 04:19 am, Niklas Lampén wrote: > mysql_data_seek(); > > > Niklas > > -Original Message- > From: Adam Douglas [ma

Re: [PHP] redirecting the browser

2001-10-24 Thread Kodrik
Header("Location: anypage.php"); > exit(); //stopping the script > ?> No, he wants to launch a script after Javascript has processed. PHP is run on the server, Javascript on the client so Javascript has to run after PHp is finished. For him to launch a Javascript code, he can only do it by con