PHP 7 Contact us form not working

Below is the simple signup form with PHP form validation all input fileds are required
and this online form written in PHP is working fine with PHP 5.6 version.

=============Start of Page 1 Code===============

<?php $first_name = $_POST['name']; // required $email = $_POST['email']; // required ?>

Enter your name:

Enter your email:



=============End of Page 1 Code=================

:: Problem ::

The same above code shows <? echo $name ?> and <? echo $email ?> written inside input text fields with PHP 7.0. In other words, the same code does not work with PHP 7.0.

I am looking to fix this but do not know how.

PHP7 has removed short opening tags. I suggest echoing like this

[php]Enter your name:

Enter your email:
[/php]

OP was already given the answer on another forum.

Sponsor our Newsletter | Privacy Policy | Terms of Service