The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> 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
Brian Chandler
post Jun 27 2021, 01:10 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



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


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

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

 



- Lo-Fi Version Time is now: 19th March 2024 - 02:57 AM