Philippe,
I recommend using an ID, instead of the NAME attribute to refer to the
various elements. This ought to solve your problem.
David
Philippe Reynolds wrote:
Greetings all,
Currently I have a form that has two lists that contain options.
I use javacript to dynamically move options
On 31 Jan 2006, at 16:07, Philippe Reynolds wrote:
To resolve this we have to create an array out of our select name:
select name=trucklist[] size=12 style=width: 150px multiple
I added the square brakets to the name...now when I select all the
options on the list I can read all values
Awesome...that solved it!!
Thanks a bunch to everyone who contributed!!
Cheers
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 31 January 2006 16:08, Philippe Reynolds wrote:
I added the square brakets to the name...now when I select
all the options
on the list I can read all values individually.
Here is problem...my javascripts have stopped working, I
can't move options
from one list to the next. Here is the
I HATE Are you sure? prompts. If I wasn't sure, I wouldn't have
clicked it in the first place.
If you want to make your users happy, trust them when they say
Delete, but make it easy to undo. Instead of deleting the records,
just set the Delete flag and timestamp. Then when the odd user
Are you sure? and then a yes and no buttons to confirm the deletion or
to cancel the command.
Any thougts??
While some of the others here have answered your technical question,
I'd like to state my opinion on usability.
I HATE Are you sure? prompts. If I wasn't sure, I wouldn't have
[snip]
Are you sure? and then a yes and no buttons to confirm the deletion or
to cancel the command.
Any thougts??
[/snip]
You can use JavaScript for this.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
philippe,
you can accomplish this by using a piece of javascript that fires off an
alert, asking the user 'yes/no'. if the user selected yes, the app would do
a submit to the page that would then take care of the mysql/db
interaction...
search on google for 'php onsubmit alert' etc...
-bruce
Good day all,
I have a problem for you all..
I have a form that has has the ability to delete a lot of information from
my MySQL database.
I would like to create a bit of security, in case the user hits the button
by accident.
I would like to create an additionnal window that would
return false ;
}
/script
-Original Message-
From: Murray @ PlanetThoughtful [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 15, 2005 12:32 PM
To: 'Philippe Reynolds'; php-general@lists.php.net
Subject: RE: [PHP] html forms in php
Good day all,
I have a problem for you all..
I have
Here's some javascript I use for such instances:
[CODE]
if (myForm.hidWhich.value == delete)
{
var verify = prompt(You are about to delete this entry \n +
\n \n +
To delete this entry you must type this phrase in the prompt
and click OK: \n
You could have tried it in the time it took you to post...
It's GET.
On Thu, May 5, 2005 7:28 pm, Oscar Andersson said:
If i do like this.
a href=huvudsida.php?action=lista target=_self
How does the webbrowser send this? With post or get or ..?
Shall i get the action with $_POST or $_GET?
On 5/5/05, Oscar Andersson [EMAIL PROTECTED] wrote:
If i do like this.
a href=huvudsida.php?action=lista target=_self
How does the webbrowser send this? With post or get or ..?
get
Shall i get the action with $_POST or $_GET?
$_GET or $_REQUEST
ex.
@$action = $_POST['action'];
Hi,
On 5/6/05, Oscar Andersson [EMAIL PROTECTED] wrote:
If i do like this.
a href=huvudsida.php?action=lista target=_self
if u do like above u might have to use $_GET['action']
How does the webbrowser send this? With post or get or ..?
Shall i get the action with $_POST or $_GET?
ex.
Nick Patsaros wrote:
Are PHP sessions compatible with frames in HTML? I'm trying to pass a
user name through a session and my individual frames aren't receiving
the variable. It worked prior to migrating to frames so I don't think
it's my PHP that is the problem. Is there a target function
echo 'html title..';
cheers
Binay
- Original Message -
From: SASSINC Internet Solutions - Arabic Department
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 17, 2004 3:31 PM
Subject: [PHP] HTML tags inside PHP??
Hi all!
How is everything?
I'm want to insert
that 4.2.2 doesn't like apache2.
Tim Van Zee
ITS Network Specialist
Governors State University
-Original Message-
From: Tim Burden [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:07 AM
To: VanZee, Timothy
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Html forms to php scripts
What
Here are the results:
Array
(
[ttt] = javattt=java
)
Array
(
[ttt] = javattt=java
)
Tim Van Zee
ITS Network Specialist
Governors State University
[ snip ]
Would be curiuos to see the the results of :
echo pre; print_r($_REQUEST); echo/pre;
echo pre; print_r($_POST); echo/pre;
That
I though we already covered that this was an PHP / Apache 2 bug?? Stop using
Apache 2 with PHP.
---John Holmes...
- Original Message -
From: VanZee, Timothy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 04, 2003 11:01 AM
Subject: RE: [PHP] Html forms to php scripts
Here
-Original Message-
From: VanZee, Timothy [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 17:31
Repost because no one replied originally. Are there any other lists
that anyone knows of for php that could be more helpful? I'm quite
disappointed in this one because I thought this was
What version of Apache are you using? Can you point us to a phpinfo() file?
- Original Message -
From: Timothy Vanzee [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 11:31 AM
Subject: FW: [PHP] Html forms to php scripts
Repost because no
It's an Apache 2 / PHP bug. I think if you use $_POST['ttt'], you'll get the
correct value, but I'm not sure. Try turning register globals off or using a
stable version of Apache that works with PHP (the 1.3 series).
---John Holmes...
- Original Message -
From: VanZee, Timothy [EMAIL
Ford, Mike [LSS] wrote:
-Original Message-
From: VanZee, Timothy [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 17:31
Repost because no one replied originally. Are there any other lists
that anyone knows of for php that could be more helpful? I'm quite
disappointed in this one because I
Hi Bob,
I want to display an HTML page if PHP can't load an
include file or otherwise has an error or just doesn't work.
How do I do this?
Not sure you can, especially not for the just doesn't work scenario.
FWIW, you can test for the existence of a file before including it:
if
Quoting Bob Lockie [EMAIL PROTECTED]:
###
### I want to display an HTML page if PHP can't load an include file or
### otherwise has an error or just doesn't work.
### How do I do this?
###
if (!$variable){print('your html stuff');}
Kinda basic, but it might help.
Cheers!
VW
###
### --
if ( !@include ( myfile.php ) ) {
// do this if file cannot be included
...code...
...code...
}
Bob Lockie wrote:
I want to display an HTML page if PHP can't load an include file or
otherwise has an error or just doesn't work.
How do I do this?
--
PHP General Mailing List
I want to display an HTML page if PHP can't load an include
file or otherwise has an error or just doesn't work.
How do I do this?
include returns false on failure and here's a hack to
demonstrate. Once you implement your own error
handling, be sure to set error_reporting accordingly
or
1) Include file not found:
if (file_exists($incfile))
include($incfile);
else
include ($error_html_file);
2) Error in file:
global $php_errormsg;
$php_errormsg = null;
@include($incfile);
$err = $php_errormsg;
if ($err)
echo The include file $incfile has an error: $err;
The trick is
3) Include and execute capturing critical errors:
$hf = fopen($incfile, 'r');
if ($hf) {
$buffer = fread($hf, filesize($incfile));
fclose($hf);
}
if ($buffer) {
global $php_errormsg;
$php_errormsg = null;
@eval($buffer);
$err = $php_errormsg;
}
The rest
There are several ways you can do this.
The easiest way is to include the file like this:
include(path_for_html_file);
You can place this line wherever you need the html file included.
See the include() function on php.net for more info.
If, instead, you want to capture the html file and do
Hi Anna,
Your REGISTER_GLOBALS is most probably set to OFF (see php.ini file). Try
using the special $_POST array created by PHP:
if ($_POST['submit'] == click){
echo Hello, $_POST[UserName];
}
If your form was using the GET method you would need the $_GET array.
Regards,
Daniel
Anna Gyor mailto:[EMAIL PROTECTED] scribbled;
Hi,
I just began to learn php and I have te following code. How can I get
the input field value in the php script? Because my script doesn't
work. $UserName is always an empty string.
?php
if ($submit == click){
echo Hello, $UserName;
What is of your PHP version?
I guess of your directive register_globals = off in your php.ini, so your
code would be run OK like this:
?php
if ($_POST['submit'] )
{
echo 'Hello'.$_POST['UserName'];
}
?
--jp
At 21:31 24-09-2002 +0200, Anna Gyor wrote:
Hi,
I just began to learn php
a search.php. Just print the information on
that page.
Chuck
-Original Message-
From: Jesse Cablek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] html input and php (newbie)
Anna Gyor mailto:[EMAIL PROTECTED] scribbled;
Hi
If you name the form elements as arrays, then yeah, they are pretty much the
same.
input type=checkbox name=foo[] value=oneOne
input type=checkbox name=foo[] value=twoTwo
input type=checkbox name=foo[] value=threeThree
When submitted, $foo will be an array containing the values that were
I've been wrestling with the same issue. I had some code loop through and
create an arbitrary number of checkbox inputs with the name 'foo[]'
I then attempted to access the array using:
foreach ($foo as $bar)
{
echo $bar;
}
but I got error messages telling me that $foo is not an array
PROTECTED]
Cc: [EMAIL PROTECTED]; Brad Harriger
[EMAIL PROTECTED]
Sent: Wednesday, May 29, 2002 7:39 PM
Subject: Re: [PHP] HTML Checkboxes and PHP variables
I've been wrestling with the same issue. I had some code loop through and
create an arbitrary number of checkbox inputs with the name 'foo
Hmm, because the .php file that is referenced from the .html file is like:
file://c:\myfile.php ? i mean maybe it's beeing accessed as if a normal file
beeing browsed and not a php file that is beeing referenced via the web
server..
"moud mohamed" [EMAIL PROTECTED] wrote in message
38 matches
Mail list logo