The message is an example I used in php before. now I use the smarty template as the message. this is an example I used in php before. now I use the smarty template as the message.
This is probably the case.
Query($sql);$smarty->assign("liuyan",$attr);$smarty->display("liuyan.html");
Html
Write the table format and traverse the database data.
The code is as follows:
Untitled DocumentMessage pagePublish information
Exit System
| Sender |
Sending time |
Recipient |
Information content |
Operation |
<{Foreach $ liuyan as $ v}>
| <{$ V [1]}> |
<{$ V [2]}> |
<{$ V [3]}> |
<{$ V [4]}> |
"> Delete |
<{/Foreach}>
This is how it works.
display("fabu.html");
Because the publishing page does not need to use a database or anything, you only need to display the html file, so there are two sentences of code.
Html file
Untitled DocumentView information
Exit System
Message sending
This page is displayed.
Query ($ SQL);?>
Query ($ SQL); if ($ r) {header ("location: liuyan. php");} else {echo "failed to add" ;}?>
This is probably done. the deletion of the information system is not done. in the previous blogs, you only need to add a processing page.
Run the command again to check whether the sender will be removed after the last release is completed.
Run
The content you just wrote will appear in the table.
Running successful
The above is the detailed content of php's simple message system using smarty. For more information, see other related articles in the first PHP community!