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
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 will be the
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
you have
form action='delete_entry.php' action='get'
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
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()
{
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?
Thnx
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 PROTECTED]
To
? $qty = 0 ; if ($qty != test) print (qty is not test); ?
? $qty = 0 ; if ($qty != test) printf(qty is not test); ?
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.
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)br\n);
$value=0
if($value) printf($value does
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
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 mean
?php
if($namethename and $passthepass)
{
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
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
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
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:
frame rows=100%, *
framset name='main' src='src.php'
frameset name='invisibleframe' src='background.php'
/frameset
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,
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
server
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
18 matches
Mail list logo