The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Input in a form echoed
tudsy
post Jun 27 2021, 08:32 AM
Post #1


Advanced Member
****

Group: Members
Posts: 246
Joined: 30-September 14
Member No.: 21,611



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
CharlesEF
post Oct 26 2021, 01:26 PM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



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>';
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 02:24 PM