- 浏览: 117824 次
- 性别:
- 来自: 武汉
文章分类
最新评论
下面来分析admin目录下的advertising_ok.php文件:
<?php
include("../conn/conn.php");
%包含conn目录下的conn.php文件,连接数据库
$title=$_POST[title];
%$_POST 变量用于收集来自 method="post" 的表单中的值。从带有 POST 方法的表单发送的信息,对任何人都是不可见的(会显示在浏览器的地址栏),并且对发送信息的量也没有限制。
此处的作用是获取advertising.php文件中的广告标题内(title)的值。
$content=$_POST[content];
%获取广告内容
$flag=$_POST[flag];
%获取是否推荐的flag
if($flag!=1){
$flag=0;
%非1则置为0
}
$fdate=date("Y-m-d h:i:s");
%date() 函数可把时间戳格式化为可读性更好的日期和时间,并获取时间
$sql=mysql_query("insert into tb_advertising(title,content,fdate,flag) values('$title','$content','$fdate',$flag)");
%将title、content、date和flag分别插入数据库
if($sql){
echo "<script>alert('企业广告信息发布成功!');parent.mainFrame.location.href='advertising.php';</script>";
}else{
echo "<script>alert('企业广告信息发布失败!');history.back();</script>";
%如果$sql非零,则提示插入成功,否则提示失败
}
?>
附:conn.php
<?php
$conn=mysql_connect("localhost","root","******") or die("数据库服务器连接错误".mysql_error());
mysql_select_db("db_pursey",$conn) or die("数据库访问错误".mysql_error());
mysql_query("set names gb2312");
?>
发表评论
-
advertising.php源代码分析
2009-05-19 22:17 607<script>function StorePag ... -
blank.php 和 bottom.php
2009-05-21 22:36 888<script>function StorePag ... -
chkadmin.php的源代码分析
2009-05-22 23:23 807<script>function StorePag ... -
del_ok.php源代码分析
2009-05-23 22:41 389<script>function StorePag ... -
find_fufei.php源码分析
2009-05-24 22:28 779<script>function StorePag ... -
find_gg.php源代码分析
2009-05-25 22:48 502<script>function StorePag ... -
find_mianfei.php源代码分析
2009-05-26 21:52 729<script>function StorePag ... -
fudel_ok.php源代码分析
2009-05-27 21:26 397<script>function StorePag ... -
gg_ok.php源代码分析
2009-05-28 21:21 423<script>function StorePag ... -
index.php源代码分析
2009-05-29 22:45 1202<script>function StorePag ... -
left.php源代码分析
2009-05-30 23:42 566<script>function StorePag ... -
login.php源代码分析
2009-05-31 22:14 1137<script>function StorePag ... -
release_content.php源代码分析
2009-06-01 22:54 749<script>function StorePag ... -
conn.php源代码分析
2009-06-02 23:42 1044<script>function StorePag ... -
car_info.php源代码分析
2009-06-03 21:55 710<script>function StorePag ... -
find_info.php源代码分析
2009-06-04 23:29 699<script>function StorePag ... -
foster_info.php源代码分析
2009-06-05 23:06 649<script>function StorePag ... -
house_info.php源代码分析
2009-06-06 23:01 609<script>function StorePag ... -
invitejob_info.php源代码分析
2009-06-07 23:49 750<script>function StorePag ... -
classAverage.py源代码分析
2009-06-09 01:06 522<script>function StorePag ...
相关推荐
advertising_system.sql
Advertising_WSD_Printers_via_mDNS_and_DNS-SD_Records.docx
利用WebBorwser和MSHTML.tlb做广告过滤器完全源码公开
雅虎研究院、计算广告鼻祖Andrei Broder关于计算广告的一个幻灯片,相信对计算广告有了解的同学应该都知道这个人。
application for j2me blutooth source codes
蓝牙模块 nRF52810 UART 源码 #include <stdint.h> ...#include "ble_advertising.h" #include "ble_conn_params.h" #include "nrf_sdh.h" #include "nrf_sdh_soc.h" #include "nrf_sdh_ble.h" #include "nrf_ble_
name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". We specifically permit and ...
GettingPaidforVoD:Advertising.......... 148 GettingPaidforVoD:ChargingfortheService.. 151 User-ProvidedContent................ 155 TheNetworkandUser-ProvidedContent .... 156 Peer-to-...
-rw-r--r-- 1 Egs-Studio staff 427508 1 14 2012 09_Advertising_AXLIB_02.rplib -rw-r--r-- 1 Egs-Studio staff 434592 1 14 2012 10_Grids_AXLIB_02.rplib -rw-r--r-- 1 Egs-Studio staff 113413 1 14 2012 ...
Facebook.Advertising.For.Dummies(2011)].Paul.Dunay.文字版(1).pdf
All Bluetooth 5 features are supported, including LE 2Mbps data rate, Long Range and LE Advertising Extension. With more than 1.5 billion devices shipped to date and dozens of licensees, the ...
Advertising_Y!DSK.rplib Axure图标 (16x16).rplib Axure图标(32x32).rplib Better Defaults (acleandesign).rplib CalendarPicker_Y!DSK.rplib Carousel_Y!DSK.rplib ChartsandTables_Y!DSK.rplib Controls_Y!DSK....
shows, print advertising, and other traditional marketing methods. Today, consumers start their shopping experience by looking on the Internet, in the search engines, the blogosphere, and social ...
高一英语The Advertising GamePPT课件.pptx
Advertising Sheet12.pdf
Advertising Sheet1.pdf
Free_for_All!_Assessing_User_Data_Exposure_to_Advertising_Libraries_on_Android 数据分析 开发安全 漏洞挖掘 端点安全 安全架构
2.1.5 Advertising the Device........................................................................................ 12 2.2 Handling Requests..............................................................
advertising.csv advertising.csv advertising.csv advertising.csv用于Tensorflow2.0学习用的训练数据
广告花费与销售额对比数据,用python实现