> Personally, I think that the code Murray gave you is
unnecessarily complex
> for this scenario.
<input name="firstname" type="text" id="firstname"
value="<?php
echo(array_key_exists('firstname',$_POST))?$_POST['firstname']:'Enter
Your
First Name'); ?>">
There's no doubt! It's home-grown.... 8)
You recommend this -
<input value="<?php if (isset($_POST['first_name'])) {
echo $_POST['first_name'];} ?>" type="text"
name="first_name"
id="first_name" />
Is there any real difference (other than the letter count) in
using
array_key_exists() and isset()?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"David Powers" <david@example.com> wrote in message
news:edoo03$k40$1@forums.macromedia.com...
> jjjhbj111 wrote:
>> Thanks for the help. Sorry David I don't use
Dreamweaver8 and still on
>> php4.
>
> The necessary code needs to be inserted by hand or using
the Server
> Behavior Builder, which is also in MX 2004 (and possible
MX, too). The
> code involved is compatible with both PHP 4 and PHP 5.
>
>> So I gather I will need to set up a variable $error
first but do I still
>> use key_array_exists()
>
> Personally, I think that the code Murray gave you is
unnecessarily complex
> for this scenario. Follow the pattern that I gave you
and test it to see
> how it works.
>
> If you're still at the beginning stages of PHP, you
would probably get a
> lot out of my book, even if you're using MX 2004.
Chapters 5 and 6 are
> devoted entirely to hand coding, and most of the
Dreamweaver server
> behaviors are common to MX 2004 and DW8.
>
> --
> David Powers
> Adobe Community Expert
> Author, "Foundation PHP for Dreamweaver 8" (friends of
ED)
>
http://foundationphp.com/