我是PHP新手。 Iv創建了一個小的PHP腳本。基本上,我有一個表格和它內部的我已呼籲show_sent功能:如果有PHP,只顯示錶格
<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
?>
.......
我希望它只會顯示,當我稱之爲「已發送」文本該功能。我怎麼能這樣做? 感謝
contact.php是在同一個頁面的形式
我猜你想在某人使用該表單後顯示此消息(「已發送」)。那麼你應該提供給我們更多關於'contact.php'的信息,因爲它是你發送表單的文件。 – kjagiello 2010-01-16 19:36:19
基本上如果有東西,如果(!$ _ POST){do_function(); die();}它會做的東西包括顯示文本 – jmasterx 2010-01-16 19:39:37
確定其打印我看到感謝 – jmasterx 2010-01-16 19:40:59