Home > Backend Development > PHP Tutorial > Leave a message Challenge the best guestbook source code (2)

Leave a message Challenge the best guestbook source code (2)

WBOY
Release: 2016-07-29 08:34:04
Original
1282 people have browsed it

post.php file
require('config.php');
?>
$nikename=$arr_request['nikename'];
if (strlen($nikename)== 0)
{
echo "

";
echo "

Error message!

";
echo "Sorry,Name is required!!! Please refill!
";
echo "
";
echo "Free guestbook byLittle BearProvides technical support";
echo "
";
exit;
}
$date_now=date('Y/m /d H:i:s');
$ip_address=getenv("REMOTE_ADDR");
$messageold=$arr_request['message'];
//$pattern="/n/";
//$replacement == computer_message($subjectold,$hang_zifu_number);
else
$subject=$subjectold;
$str_sql=" insert into $table_name
(nikename,subject,date_created,ip_address,message,email_address,zhuye_address,oicq)
values ​​
( ' $nikename',
'$subject',
'$date_now',
'$ip_address',
'$message',
'".$arr_request['email_address']."',
'".$arr_request[ 'zhuye_address']."',
'".$arr_request['oicq']."'
)";
$result=mysql_db_query($db_name,$str_sql,$id_link);
if (! $result){ R AFFY_ERROR_EXIT ('SQL Insert Execution has failed.'); N "& gt;";
echo " Publish an article";
  echo "";
  echo "< meta HTTP-EQUIV="REFRESH" C
echo "
";
echo "
    Thank you for leaving a message, the message content will be automatically displayed ";
                                                                           " ;/a>
";
exit

My guestbook


First of all, thank you for your message and every word you said I will read them all carefully! ! !
  

  
  
   
  
   
  
   
  
  
   
  
  
   
  
  
  
  
  
  
  
  
    
    
  
  
呢称:(不能为空)    
    
OICQ号码:  
    
e-mail:       
    
个人主页:  
    

    主题:
  
    

    内容:

    

      
    

      
    

  

   


查看留言



免费留言本由小熊提供技术支持


display.inc文件!!!


email_address ?> >
nikename ?>


留言时间:date_created ?>
来自:
$ip_address=ip_question($record->ip_address);
echo $ip_address;   
?>



主题:subject ?>


message ?>


if ($record->huifu_biaozi)  
   {  
     ?>
      

版主回复:

      huifu ?>

      
       }
?>  



email_address ?> >
alt="nikename ?>的e-mail地址是:email_address ?> "  
border="0" width="15" length="15">邮件

zhuye_address ?>>alt="nikename ?>的主页地址是:zhuye_address ?> "  
border="0"  
width="14" length="14" >主页

<?php echo $record->nikename?>的OICQ是: <br><?php echo $record->oicq ?>width="14" length="14" >OICQ
key_liuyan ?>>只有版主才有删除的权限哦!删除
key_liuyan ?> >不好意思,现在暂时只有版主才能回复回复




  

以上就介绍了留言 挑战最棒的留言本的源码(二),包括了留言方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template