无法从PHP连接到MySQL [英] Unable to connect to MySQL from PHP

查看:95
本文介绍了无法从PHP连接到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码,我在同一页面中进行html设计并获取发布的值,但无法连接到mysql

hi here is my code where i am html design in same page and getting the posted values but unable to connect to mysql

//set defaults assuming the worst
include("connection.php");

//verify we have that value in $__POST
if (isset($_POST['submit']))
{
   $submit = $_POST['submit'];
    //If it is true, try some math
    if($submit == "Search")
    {
        if (isset($_POST['for']))
        {
            $for = $_POST['for'];
            //Add checks to see if your values are numbers
        }

        if (isset($_POST['rad']))
        {
            $rad = $_POST['rad'];
        }
        if (isset($_POST['location']))
        {
            $loc = $_POST['location'];
        }
    }
 }
?>

推荐答案

__ POST 如果(isset(
__POST if (isset(


_POST [' 提交'])) {
_POST['submit'])) {


submit =


这篇关于无法从PHP连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆