Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ Form problems

Posted by: tudsy Jul 1 2021, 07:35 AM

Hi

Is there anything wrong with these statements?:

$email =$data['emailadd'];

<input type="email" id="address" name="email" placeholder="Enter Email address" Required />


<script>document.getElementById("address").value = <?php echo $email; ?></script>


Any help will be appreciated. Thanks.

Posted by: Brian Chandler Jul 1 2021, 11:14 AM

What do you mean by "wrong"? Sorry, but you keep asking these disconnected questions, and it simply makes no sense to ask "are these wrong?" Depending on exactly where they appeared I think all of the above strings could be perfectly OK. But programs are not like cakes; you do not simply chuck the ingredients in, mix them, and bake for 45 minutes.

Do you understand the basic rules of PHP? How to include variable bits from PHP in the output web page?

Can you say for each of the above *exactly* what they are meant to do?

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