, no.
Default is register_globals= Off for PHP = 4.2.0
http://us2.php.net/register_globals
RDB
Sparky
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 14:56
Subject: Re: [PHP] ARGHHH!!! POST variable problem
On Monday 30
At 22:38 29-6-2003, you wrote:
I can click links and they work but when I enter data in a form and try to
send it to the next php script to process the data, nothing happens. Is
there a simple way I can see what is returning from the browser to see if
what I expect is actually getting there?? I
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 14:56
Subject: Re: [PHP] ARGHHH!!! POST variable problem
On Monday 30 June 2003 04:38, Sparky Kopetzky wrote:
I can click links and they work but when I enter data in a form and try
to
send it to the next php script
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
How do I do this?
-antti
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
$$foo = blah;
that will set $bar equal to blah.
-Dan Joseph
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Tue, 17 Jun 2003, Antti wrote:
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
How do I do this?
?php
$foo = 'bar';
$$foo = 'barvalue';
print $bar;
?
This prints barvalue.
--
Mika Tuupola
Ho can I create (name) a variable with other variables value?
If $foo = bar;
then the variable I want to create is $bar.
How do I do this?
$$foo
see: http://www.php.net/manual/en/language.variables.variable.php
-
michal
$$foo or ${$foo} somethinbg like that ?
http://us2.php.net/manual/en/language.variables.variable.php
R'twick
- Original Message -
From: Antti [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 17, 2003 2:19 PM
Subject: [PHP] Naming a variable with a variable
Ho can I create
-Original Message-
From: Amanda McComb [mailto:[EMAIL PROTECTED]
Sent: 12 June 2003 22:21
Is there a way to make a variable not exist? There are several places
where I test (!$variable), and I want to be able to change the
variable to pass that test, even though it exists, under
Is there a way to make a variable not exist? There are several places
where I test (!$variable), and I want to be able to change the
variable to pass that test, even though it exists, under certain
circumstances.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Is there a way to make a variable not exist? There are several places
where I test (!$variable), and I want to be able to change the
variable to pass that test, even though it exists, under certain
circumstances.
Thanks.
You can unset the variable www.php.net/unset but also I would
And won't generate a notice.
Alex Earl wrote:
You can unset the variable www.php.net/unset but also I would recommend
using if(!isset($variable)) instead of just if(!$variable) its a little
more clear as to what you are really trying to see I think.
Alex
--
The above message is encrypted
Hi,
I am having problem with a PHP page on our web site.
I've installed the latest version of PHP on a Windows 2000 server.
The error we're getting is:
Notice: Undefined variable: PHP_SELF
Where do I start to fix this problem?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To
I am having problem with a PHP page on our web site.
I've installed the latest version of PHP on a Windows 2000 server.
The error we're getting is:
Notice: Undefined variable: PHP_SELF
Where do I start to fix this problem?
Read the release notes. Register_globals is OFF. Use
-Original Message-
From: ODCS [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 08:10
I have a form where the user inputs information - the code
below is the
error checking for one of the fields. The first IF statement
just checks
that the filed is not empty and works fine.
Then
I have a form where the user inputs information - the code below is the
error checking for one of the fields. The first IF statement just checks
that the filed is not empty and works fine.
Then I check a function I made to see if the user is already in a mysql
database and the function returns
In my PHP script I have coded e.g.:
$sql = INSERT INTO `$owners` ( `FirstName`, `LastName`) VALUES (
'$firstname' , '$lastname' );
$result = mysql_query($sql);
So along comes e.g. John O'Groats and nothing gets inserted into the
database.
OK, I can bypass my oversight by stripping out
you must remove the backticks.
Jim
- Original Message -
From: rentAweek Ltd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 22, 2003 9:50 AM
Subject: [PHP] Separators in variable values causing MySQL commands to fail
In my PHP script I have coded e.g.:
$sql = INSERT
On Sat, 22 Mar 2003 17:50:30 +, you wrote:
OK, I can bypass my oversight by stripping out apostophes from the
variable values. There has to be a better way please.
http://www.php.net/manual/en/function.mysql-escape-string.php
--
PHP General Mailing List (http://www.php.net/)
To
and , you need to escape the values that you are inputing
ie. htmlspecialchars() or htmlentities() those values
Jim
- Original Message -
From: rentAweek Ltd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 22, 2003 9:50 AM
Subject: [PHP] Separators in variable values
OK, I can bypass my oversight by stripping out apostophes from the
variable values. There has to be a better way please.
Turn on Magic Quotes GPC or use the addslashes() function. Or, if you
want to be more precise and MySQL-specific, use the
mysql_escape_string() or mysql_real_escape_string()
- rentAweek,
rL In my PHP script I have coded e.g.:
rL $sql = INSERT INTO `$owners` ( `FirstName`, `LastName`) VALUES (
rL '$firstname' , '$lastname' );
rL $result = mysql_query($sql);
rL So along comes e.g. John O'Groats and nothing gets inserted into the
rL database.
rL OK, I can bypass
You have register_globals set to off (read up on register globals in
php.net).
your code should read
$HTTP_POST_VARS['action'] or $_POST['action'] (depending on PHP version)
INSTEAD of just $action.
so to test an if::
if ($HTTP_POST_VARS['action']==1) {
/*
Code for if action is equal to 1
*/
}
That's actually a GET request, so $_GET['action'], instead of $_POST.
On Wed, 2003-03-19 at 11:18, Bobby Patel wrote:
You have register_globals set to off (read up on register globals in
php.net).
your code should read
$HTTP_POST_VARS['action'] or $_POST['action'] (depending on
Hi all,
1.If register_globals is on, then doing an unset($_SESSION[blah]), to unset
a session variable will not work as the variable will be unset in that
particular instance but will be restored in next instance of that session.
Hence session_unregister(blah) also must be used to properly
I am trying to write a quick form-mail script (like Matt's) and I am stuck
on one small part:
form:
form method=post action=form.php
input type=text name='field1'br
input type=text name='field2'br
input type=text name='field3'br
input type=text name='field4'br
input type=text name='field5'br
I am trying to write a quick form-mail script (like Matt's) and I am
stuck
on one small part:
form:
form method=post action=form.php
input type=text name='field1'br
input type=text name='field2'br
input type=text name='field3'br
input type=text name='field4'br
input type=text
Hi,
I have spend several hours on the following issue, and I can't figure out
what I am doing wrong.
Consider the next function:
function CreateFileForRealPlayer () {
global $playlist;
$filename = $playlist[0]['url'];
header(Content-Type: audio/x-pn-realaudio;);
echo ($filename);
}
try:
if (isset($_POST['frmAction']) $_POST['frmAction'] == formmail)
instead of your line.
Thomas
On Wed, 22 Jan 2003 09:47:46 -0500 [EMAIL PROTECTED] (Stephen Goehler) wrote:
Hey guys,
Thanks in advance for your help.
I'm working on emailing the contents of a form using php. It
Now it gets more confusing.I added:
print 'pre';
print_r($_POST);
print '/pre';
to my form and the variables are displayed properly, but only generate
errors when I try to add it to fputs().any ideas?
Stephen Goehler [EMAIL PROTECTED] wrote in message
[EMAIL
it won't work the way you are doing this.
Try something like that line (changed from yours):
fputs($fd, From: .$_POST['name']. .$_POST['email'].\n);
Don't ask arrays directly in a string.
Thomas
On Wed, 22 Jan 2003 11:15:35 -0500 [EMAIL PROTECTED] (Stephen Goehler) wrote:
Now it gets
Thanks guys for helping out. I got it working now!
Thomas Seifert [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
it won't work the way you are doing this.
Try something like that line (changed from yours):
fputs($fd, From: .$_POST['name'].
Hi All,
I'm trying to add a variable to an oracle database but it fails due
to the fact that it contains quotation marks. These have to be present for
the end user. My Script is as follows:
===
if ($conn == true)
{
$query = UPDATE ACTIVITY SET COMMENTS = \'$updatecomments\' WHERE ACTIVITY_ID
=\'$actcode\';
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 6:53 AM
Subject: [PHP] Adding a variable to oracle that contains quotation marks??
Hi All
Once you use double quota mark the character BackSlash doesn't need anymore
that's my experience ^_^
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 8:56 PM
Subject: Re: [PHP] Adding a variable to oracle
.
-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 13:12
To: Rick Emery; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Adding a variable to oracle that contains quotation
marks??
Once you use double quota mark the character BackSlash doesn't need anymore
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 15:05
Thanks Rick Henry, but I am still unable to add single
quotation marks '.
When I added the \' to the variable as given below (thanks
again Rick) I get
the following error when
- Original Message -
From: menezesd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 13, 2003 6:21 PM
Subject: [PHP] Error in variable when looping
Hello friends,
I have made the following table of data and a button on every row to
view the details. The code is
working fine
Ward
http://www.chessish.com
mailto:[EMAIL PROTECTED]
- Original Message -
From: menezesd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 12:21 AM
Subject: [PHP] Error in variable when looping
Hello friends,
I have made the following table of data and a button
Hello Tim.
Could you help me a little further and tell me exactly where to put this?
Thanks
Denis
- Original Message -
From: Tim Ward [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 5:16 PM
Subject: Re: [PHP] Error in variable when looping
://www.chessish.com
mailto:[EMAIL PROTECTED]
- Original Message -
From: Denis L. Menezes [EMAIL PROTECTED]
To: Tim Ward [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 11:50 AM
Subject: Re: [PHP] Error in variable when looping
Hello Tim.
Could you help me a little
Hello friends,
I have made the following table of data and a button on every row to view the details.
The code is working fine and the table is displayed with the buttons.
The problem I have is that the $SelectedItemNumber posted to the next page remains the
same number no matter which row
so where is $rowe set?
Show us code that calls this page
- Original Message -
From: menezesd [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 13, 2003 6:21 PM
Subject: [PHP] Error in variable when looping
Hello friends,
I have made the following table of data and a button
Everything works fine, just now I'm getting Notice messages for every
undefined variable or undefined index in arrays..
So now I have to use issset() everytime to avoid this messages...
you would initialize your variables in the beginning of your scripts. With
that, you don't need isset().
..is
example:
location.href=$destination;
or
location.href=?php $destination; ;
or
echo location.href=', $destino, ';;
PLEASE GIVE A IDEA
Ysrael Guzmán Meza
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
location.href=?= $destination ?
should work ... hth ... Bill
-Original Message-
From: Ysrael Guzmán [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] read javascript variable php?
example:
location.href=$destination
Please help! I am a beginner of php, I got an error from my own webpage:
Notice: Undefined variable: Array in C:\Inetpub\wwwroot\php\HandleForm.php
on line 23
Please enter a valid Web address!
Below is my code:
?
function WriteToFile ($URL, $Description) {
/* Function WriteToFile takes two
- A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
-Original Message-
From: New B [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 9:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Help: Undefined variable
Please help! I am a beginner of php
I have this code whitch I have been staring at for hours and I just
cant figure out what is going on...
it is about as simple as it gets I just need to pass a variable from
this page to it self, and that would be tha variable $nafn
I have this included code included into another page that is
Read this:
http://www.php.net/variables.external
Pay special attention to the parts about the PHP
directive register_globals.
If on, both $_GET['nafn'] and $nafn will exist. If
off, $nafn will not exist. As of PHP 4.2.0, the default
for this in php.ini went from on to off.
This applies
How can you hide URL variables without using the POST method in a form?
Thanks,
Stephen Craton
http://www.melchior.us
What is a dreamer that cannot persevere? -- http://www.melchior.us
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
store them in a session or cookie
Tim Ward
http://www.chessish.com
mailto:[EMAIL PROTECTED]
- Original Message -
From: Stephen [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Sunday, December 08, 2002 8:10 PM
Subject: [PHP] Hiding URL Variable
How can you hide URL variables
Adriano Santos wrote:
Hi,
I'm with problem: Undefined Variable.
I'm using :
PHP 4.2.3
MySql 3.2.39
Windows 2000
How do I make to soluction my problem ?
at the top of your script:
error_reporting(E_ALL ~E_NOTICE);
or initialize your variables likes:
$number = 0;
$string = foo;
Derick
s:[EMAIL PROTECTED]...
Adriano Santos wrote:
Hi,
I'm with problem: Undefined Variable.
I'm using :
PHP 4.2.3
MySql 3.2.39
Windows 2000
How do I make to soluction my problem ?
at the top of your script:
error_reporting(E_ALL ~E_NOTICE);
or initialize your variables likes:
$nu
Adriano Santos wrote:
My php.ini: error_reporting = E_ALL ~E_NOTICE
I have a form to send of the variables, but my page do not receive values.
This my code:
?php
$nome = StrToLower($nome);
$senha = StrToLower($senha);
?
I guess you use PHP 4.2.0+; since this version the register_globals
Thanks.
Sorry, but I forgot to say the variables froming from part 2 to part 3 can be anything between 1 and 30 or any combination thereof. input type=hidden
will be no good here as it is too hard to pre-distringuish which variable names will be transferred
Thanks
Michael Benbow wrote:
Hi,
I
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] says...
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that uses it.
Because that's the way it is? Well,
*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hi,
JR said:
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function names? Or constants?
For big projects and/or safety
I've searched, but haven't found the answer -- from a language design point
of view, why are there $ on the front of PHP variable names?
Thanks,
Bruce
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
brucedickey wrote:
I've searched, but haven't found the answer -- from a language design point
of view, why are there $ on the front of PHP variable names
On Tue, 12 Nov 2002, brucedickey wrote:
I've searched, but haven't found the answer -- from a language design point
of view, why are there $ on the front of PHP variable names?
... so Perl converts know where there variables are ;)
~Chris
--
PHP General Mailing List (http
On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote:
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
Yup. So you can have:
print I'm a $variable;
instead of the messy javascript way:
alert(I'm
the answer -- from a language design point
of view, why are there $ on the front of PHP variable names?
Thanks,
Bruce
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
: [PHP] Why $ on variable names?
On Wednesday 13 November 2002 02:35, Leif K-Brooks wrote:
I'm just guessing here. For one thing, to seperate variables from
constants. Also, it makes it possible to use variables within quotes.
Yup. So you can have:
print I'm a $variable;
instead of the messy
In an earlier message, Jason Wong [mailto:php-general;gremlins.com.hk] said
...
Yup. So you can have:
print I'm a $variable;
instead of the messy javascript way:
alert(I'm a . $variable);
But the language could still support variable evaluation within strings
without requiring the
If I can venture a comment, what you think clutters the code others
may find a quick and easy way to identify a variable in it.
Just a thought.
Marco
--
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Come visit
In an earlier message, Marco Tabini [mailto:marcot;inicode.com] saidf ...
If I can venture a comment, what you think
clutters the code others may find a quick and
easy way to identify a variable in it.
I guess this could be true. But I don't understand why someone would need
an easy way to
How about:
That's the way the language designers did it, and there's LOTS of
PRODUCTION code out
there that uses it.
See also the precedence of PERL.
LER
--On Tuesday, November 12, 2002 16:40:46 -0500 Jonathan Rosenberg (Tabby's
Place) [EMAIL PROTECTED] wrote:
In an earlier message,
At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said:
[snip]
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function names? Or constants?
In any case,
: [PHP] Why $ on variable names?
At 22:40 12.11.2002, Jonathan Rosenberg \(Tabby's Place\) said:
[snip]
I guess this could be true. But I don't understand why someone would need
an easy way to identify variables? Why not an easy way to identify
function
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that uses it.
Because that's the way it is? Well, that's good enough for me. I'll
never question anything else again
--On Tuesday, November 12, 2002 16:53:07 -0500 Jonathan Rosenberg (Tabby's
Place) [EMAIL PROTECTED] wrote:
In an earlier message, Larry Rosenman [mailto:ler;lerctr.org] said ...
How about:
That's the way the language designers did it, and
there's LOTS of PRODUCTION code out there that
In an earlier message, Ernest E Vogelsinger [mailto:ernest;vogelsinger.at]
said ...
Think of how an interpreter works. It parses the
sourcecode in realtime, not as a compiler. People must
_wait_, every time, until it is finished,
not only once like a compiler. Thus designers of
interpreted
try this:
$mmdd = $foo.$bar.$bleh.$doh; /*note double-quotes and the concat
operator (the period) */
$$mmdd = a_date_value;
To test;
echo $mmdd ;
echo $$mmdd; /*provided that a_date_value is a string literal*/
Robert McPeak [EMAIL PROTECTED] wrote in message
Hi All,
I am have trouble getting $address to print the URL that is in the db.
td class=\dtd\a href=\$address\ target=\_blank\%s/a/td is
printing the url with the word address instead of the real address.
The code is below.
$sql =SELECT * FROM links ORDER BY owner;
$sql_result =
- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 27, 2002 2:00 PM
Subject: [PHP] defining a variable
Hi All,
I am have trouble getting $address to print the URL that is in the db.
td class=\dtd\a href=\$address\ target=\_blank\%s/a/td
Matt wrote:
- Original Message -
From: Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 27, 2002 2:00 PM
Subject: [PHP] defining a variable
Don't just try to change 'address' to $row['address'] abve, because you
haven't fetched the result yet, and it will be blank
On Thu, 24 Oct 2002 21:26:30 +, John W. Holmes wrote:
What is supposed to be in the session? Maybe these users are just
denying cookies?
Maybe... But my php compiled with --use-trans-sid and use this feature.
In the session i store account, access timestamp etc...
P.S. And 10% of traffic
I have same troubles!!! I use php internet trade traffic system, and
10-20% of visitors lose their sessions data. Cut from logs:
Remote address: ##
Referer: http://mydomain.com/
URI: /out.php?id=1PHPSESSID=235a91cef853e750a6b67a70375e7d88
User-agent: Mozilla/4.0 (compatible; MSIE 5.5;
What is supposed to be in the session? Maybe these users are just
denying cookies?
---John Holmes...
-Original Message-
From: Victor Soroka [mailto:vs240;yahoo.com]
Sent: Thursday, October 24, 2002 10:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP Session register variable
You very likely need to use $_REQUEST[hidden_manuf_id] in your first
example, which is almost correct otherwise( for security reasons, also
put single quotes around it)
Phil Clark wrote:
I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.
If i do this:
$query = DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\;
mysql_query($query,$bb) or die(mysql_error());
or:
mysql_query(DELETE FROM product WHERE manufacturer=\$hidden_manuf_id\, $bb);
=
Phil Clark wrote:
I'm trying to insert the variable
You can use this function : get_object_vars to retreive vars from a class..
Here is the example from phpdoc :
?php
class Point2D {
var $x, $y;
var $name;
function Point2D($x, $y) {
$this-x = $x;
$this-y = $y;
}
function setName($name) {
$this-name =
On Tuesday 15 October 2002 12:54, Phil Clark wrote:
I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.
If i do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
That should work iff manufacturer is a
What I want to do is have an IF statement which the results would create a
variable. The IF statement is:
IF ($car == BMW AND $model == 530i) echo (Price is 35,000 dollars);
I want the Price is 35,000 dollars to be a variable. Please help with how
to do this.
Thanks,
Ben
--
PHP General
John, It works...thanks
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 8:34 PM
To: 'Ben C.'; [EMAIL PROTECTED]
Subject: RE: [PHP] Creating a variable out of a IF statement
What I want to do is have an IF statement which the results
Passing string variable to HTML TITLE tag fails within
Netscape but workwell within IE.I have a single page consisting of
inventory items to be sold. When an itemis selected, it passes the product
name to a DETAIL page as part of theTITLE tag for the DETAIL page. My
problem is: Netscape
You should give more information about your original problem rather than
inquire about any workaround.
I don't understand how passing string variable to html title tag fails
within Netscape but work well within IE.
dwalker wrote:
Passing string variable to HTML TITLE tag fails within
I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.
If i do this:
mysql_query(DELETE FROM product WHERE manufacturer=$hidden_manuf_id,$bb)
or die(mysql_error());
PHP server doesn't see the variable because it is inside the string
quotes.
If I do this:
Single around the variable
mysql_query(DELETE FROM product WHERE manufacturer='$hidden_manuf_id',$bb)
Timothy Hitchens
[EMAIL PROTECTED]
Phil Clark wrote:
I'm trying to insert the variable $hidden_manuf_id into a mysql_query()
statement.
If i do this:
mysql_query(DELETE FROM
Hi, thanks for the help!
I worked, but i dont get it, why use $_POST['name'] or $_GET['name'] when
the text from the internet and books I've read says just put a dollar sign
before the variable's name.
If it wouldn't be a burden can u pls xplain?
--
PHP General Mailing List
off by default in your php.ini so you can't use the posted variables (or
the ones passed by url) by just putting a $ at the beginning of the
variable name.
cheers
J
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Muhammad Khairuzzaman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I worked, but i dont get it, why use $_POST['name'] or $_GET['name'] when
If you set a variable inside your script called $validuser=true, how
would you know if that was POSTed to your
I have been trying to save a variable using PHP sessions.
What I find is that while most of the time the variable content is restored
and available on the subsequent pages, however there are times that the
variable seems to be there but the contents are not. If I hit the browser
refresh
I have been trying to save a variable using PHP sessions.
What I find is that while most of the time the variable content is
restored
and available on the subsequent pages, however there are times that
the
variable seems to be there but the contents are not. If I hit the
browser
refresh
I'd like to be able to modify the switch variable inside a case
statement, like this:
switch ($foo) {
case 'step2':
do_step2();
if ($error) $foo='step1'; //repeat step1
break;
case 'step1':
do_step1();
break;
case 'a_third_thing':
do_something_else();
break;
}
Can
Actually, you can--just don't "break;".
Try it.
- E
I'd like to be able to modify the switch variable inside a case
statement, like this:
switch ($foo) {
case 'step2':
do_step2();
if ($error) $foo='step1'; //repeat step1
break;
case 'step1':
do_step1();
break;
If you don't break, it continues to execute all the code until
the end of the switch, ignoring any subsequent case
statements.
In my example, eliminating the break after step2 would
cause execution of do_step1(), but also do_something_else(),
which is not desired.
--- @ Edwin [EMAIL PROTECTED]
Well, you don't have to take away all the "break;". :)
For example, only here:
switch ($foo) {
case 'step2':
do_step2();
if ($error) $foo='step1'; //repeat step1
break;
- E
If you don't break, it continues to execute all the code until
the end of the switch, ignoring any
601 - 700 of 980 matches
Mail list logo