在index.php加代码,不成功,请教
2016-07-07 15:05 来源:www.chinab4c.com 作者:ecshop专家
| if($_REQUEST['action'] == 'act_add_message'){ $username = isset($_POST['username']) ? trim($_POST['username']) : ''; //取不到值,为何? $tel = isset($_POST['tel']) ? trim($_POST['tel']) : ''; $email = isset($_POST['email']) ? trim($_POST['email']) : ''; $ordertype = isset($_POST['ordertype']) ? trim($_POST['ordertype']) : ''; $postalcode = isset($_POST['postalcode']) ? trim($_POST['postalcode']) : ''; $addess = isset($_POST['addess']) ? trim($_POST['addess']) : ''; $gustbook = isset($_POST['gustbook']) ? trim($_POST['gustbook']) : ''; if($username == "" || $tel == ""){ echo "为空!"; }else { $sql = "insert into ". $ecs->table('ky_order')."(username,tel,ordertype,postalcode,addess,gustbook,email) values ('$username','$tel','$ordertype','$postalcode','$addess','$gustbook','$email')"; echo $sql."<br>"; $db->query($sql); echo "OK!!!"; } } | 
回答:
| <form action="index.php?action=act_add_message" method="post" id="registerForm"name="registerForm"> <table style=" margin-top:15px;" width="613" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#8F92A1" bgcolor="#E8E8E6"> <tr> <td width="70" height="28"><div align="right">姓名:</div></td> <td width="222">   <input type="text" name="p_name" id="nameid" /></td> <td width="77"><div align="right">电话:</div></td> <td width="234">  <input type="text" name="p_telephone"id="telid"/></td> </tr> <tr> <td height="28"><div align="right">订购类型:</div></td> <td colspan="3">  <select name="p_type"> <option> sssssoption> <option>wwwwww</option> <option>bbbbb</option> <option>便携旅行装 原价:614元 现价:582元 (内含64片)</option> </select></td> </tr> <tr> <td height="28"><div align="right">地址:</div></td> <td>  <input type="text" name="p_address" /></td> <td><div align="right">邮编:</div></td> <td>  <input type="text" name="p_zip" /></td> </tr> <tr> <td height="28"><div align="right">E-mail:</div></td> <td>  <input type="text" name="p_email" /></td> <td> </td> <td> </td> </tr> <tr> <td height="91"><div align="right">留言:</div></td> <td colspan="3">  <textarea name="p_details" cols="60" rows="5"></textarea></td></tr> <tr> <td height="33" colspan="4"> <inputtype="submit" onclick="return checkSignupForm();" name="Submit" value="提交" /> <input class="bt" style="cursor:hand;" type="reset" name="Submit2" value="重填" /></td> </tr> </table> </form> 静态页面 | 
| 你也以在themes/default/index.dwt中修改适一下! | 
| 在那个位置,加了什么代码? | 
 
        
					
						
                          
					
				 
      
      最近更新
常用插件
- ecshop商品分类名称增加样
                                  ecshop插件介绍:本插件可以方便在后台管理,为ecshop商品分类名称增加样... 
- ecshop分类批量扩展插件
                                  ecshop分类批量扩展插件,这个插件是ecshop插件里面比较核心的插件。我们... 
- ecshop二次开发详细页面生
                                  插件介绍: ECSHOP系统,在很多时候,很多商品没有人购买,不但购买的人... 
- ecshop二次商品订购人信息
                                  ecshop二次商品订购人信息填写插件,有时候给朋友送花,或者是送礼品的... 
- ecshop2.7.1打印发货单插件
                                  ecshop2.7.1打印发货单插件介绍:ecshop2.7.1和以前的ecshop版本不一样,ecs... 
ecshop热门问答
ecshop热门资料
          
               
            ecshop显示数量问题 
                
            ecshop一号店分类首页 
                
            ecshopSportsShoes 
                
            ecshop搜索结果异常 
                
            ecshop自动更新 
                
            ecshop失误 
                
            ecshop敏感 
                
            ecshop官方 
                
            ecshopdigit;模版;底色 
                
            ecshop购物车商品选择结算 
                
            ecshopred 
                
            ecshop服务器时间 
                
            ecshop聊天 
                
            ecshop注册页 
                
            ecshopECSHOPh 
                
            ecshop外国 
                
            ecshop不胜感激 
                
            ecshoppossibly 
                
            ecshop手机浏览 
                
            ecshop去百度 
                
            ecshop收购 
                
            ecshopmysql 
                
            ecshop供货商 
                
            ecshop红圈 
                
            ecshop排版错误 
                
            uchome栏目权限 
                
            ecshophome 
                
            ecshop京东360 
                
            ecshopstye 
                
            ecshop正在复制文件 
             
        
      


