Challenge the best guestbook source code (2)_PHP tutorial

WBOY
Release: 2016-07-21 16:03:40
Original
643 people have browsed it

post.php file
require('config.php');
?>




$nikename=$arr_request['nikename'];

if (strlen($nikename)==0)
{
echo "

";

echo "

Error message!

";
echo "Sorry, is called must Fill in!!! Please refill!
";
echo "
";
echo "Free guestbook byLittle Bear provides 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="
";

$message=computer_message($messageold,$hang_zifu_number);

$subjectold=$ arr_request['subject'];
if (strlen($subjectold)>$hang_zifu_number)

$subject=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){
affy_error_exit('SQL Insert Execution has failed.');
}

else

{


echo "";
echo "< ;HTML>Publish an article";
    echo "";
echo "";
echo "< ;br>";
echo "
    Thank you for leaving a message, the content of the message will be automatically displayed";
    echo "
    "; ; If your browser does not automatically return to the homepage of the message book,
    Please click here to return. ";
    echo" & lt;/a & gt; & lt;/ul & gt; 🎜> exit;


    }
    ?>

    index.html file




    Thank you for your message!

    My guestbook


    First of all, thank you for your message. I will read every word of it 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 ?> >不好意思,现在暂时只有版主才能回复回复







      

    www.bkjia.comtruehttp://www.bkjia.com/PHPjc/316185.htmlTechArticlepost.php 文件 ?php require('config.php'); ? ?php $nikename=$arr_request['nikename']; if (strlen($nikename)==0) { echo center; echo h2font color=red错误信息!/font/h2; echo 对不...
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