• PHP Tools
  • PHP Form Validation - Field values showing and not re-populating?

Hello,

I downloaded the validation.php and the demo.php page. I saved the demo page to my dev environment so that I could try to get it to work and understand what was happening before I implemented it in my page

When I display the test page, all of the fields show "<?=$fields['email']?>" in them instead of being blank. I tried replacing the "<?=" with "<?php", and I got a error in the field upon refresh that read, "Notice: Undefined index: user_name in C:\inetpub\wwwroot\CW2\demo.php on line 172".

I'm not sure what is going on. A bit of a newbie, and this really has be stumped. Any and all help is greatly appreciated!

Thanks!

    If you need to convert <?= to the long form, it would be <?php echo (while <? would just be <?php).

      This also indicates your php version is extremely out of date. The <?= short print tag is always available starting with php5.4 (released 2012, last supported 2015.)

      10 days later

      Thank you all for your replies.

      [Mod: spammy-looking urls removed]

        Write a Reply...