I’m new to PHP. Iv created a small php script. Basically I have a form and inside of it I have a function called show_sent:
<form method="post" action="contact.php" class="formstyle">
<h2>Formulaire de contact : </h2>
<p> </p>
<?
function show_sent(){
?>
<p>Sent</p>
<?
} // the function finishes here
?>
…….
I was hoping that it would only show the ‘Sent’ text when I call that function. How could I do this?
Thanks
contact.php is the same page as the form
You need to clean up your code a bit. Jumping into and out of HTML and PHP is not a good thing.