Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ Input in a form echoed

Posted by: tudsy Jun 27 2021, 08:32 AM

Hi

I am having trouble with this statement:


echo '<input type="email" name="email" value="<?php echo $data["emailadd"]; ?>" placeholder = "Enter email address" Required>';


This statement is inside a form.

Any help would be helpful.

Thanks.

Posted by: Brian Chandler Jun 27 2021, 01:10 PM

Did my previous answer not help? This question has more or less the same answer: you have to learn at least the basics of PHP syntax, then you have to unpick what you are trying to do.

Posted by: CharlesEF Oct 26 2021, 01:26 PM

I think your problem is the double <?php ?> tags. You can't put php tags inside one another. Remove the 2nd php tag and it should work:

CODE
echo '<input type="email" name="email" value="' . $data["emailadd"] . '" placeholder = "Enter email address" Required>';

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)