Help with html and php integration

Hello
I have a question, i have build up a small code here.
And the HTML paragraph will display “Some text here!”
But what do i do if i want to change the text of the HTML paragraph after the submit button is clicked? :smiley:

<?php
  $var = 'Some text here!'
?>

<html>
  <body>
    <form>
      <h5>Firstname:</h5> <input type="text">
      <input type="submit" Value="Click me!"><p><?php echo $var; ?></p>
    </form>
  </body>
</html>

<?php
  Help here.
?>

Thanks in advance
Jones :wink:

hello Jones,
use below code

<?php $var = ''; if(isset($_POST['fname'])) $var = 'First Name is '.$_POST['fname'].''; ?> Firstname:

<?php echo $var; ?>

I hope you looking for this.
SR

Sponsor our Newsletter | Privacy Policy | Terms of Service