gpt4 book ai didi

javascript - 清理了 SQL/PHP,它没有写入。不会选择你的 CSS

转载 作者:太空宇宙 更新时间:2023-11-04 10:29:31 25 4
gpt4 key购买 nike

<!DOCTYPE html>
<html lang="en">
<head>

<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Collecting Data for Database</title>
<meta name="description" content="">
<meta name="author" content="AleR">

<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">

<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="skeleton.css">
<!-- <link rel="stylesheet" href="backbone.css"> -->

<style>
#container{
width:90%;
margin: 40px auto 0 auto;

}
h1 {color:lightgreen;}

</style>

<style>
body {background-color:lightgreen; color: green;}
h1 {color: lightgreen;}
p {color: lightgreen;}
header {
margin-top: -25px;
margin-left: -500px;
height: 100px;
width: 10000px;
background-color: green;
}

nav{background-color: green; height: 100%;
width: 100%;}
aside{background-color: green; height: 100%;
width: 100%;}


</style>
</head>
<header></header>
<nav></nav>
<aside></aside>
<body>

<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->

<div id="container" align="center">
<form action="final.php" method="post">
<div class="row">
<div class="six columns">
<label for="Age">Category</label>
<input class="u-full-width" type="text" name="Category">

<label for="Qualifications">Qualifications</label>
<input class="u-full-width" type="text" name="Qualifications">

<label for="Experience">Experience</label>
<input class="u-full-width" type="text" name="Experience">


</form>

</div>

</div>

<form action="final.php" method="post">
<input class="button-primary" type="submit" value="Submit">
</form>
</div>



</body>
</html>

在第一个代码集中,我遇到了被识别的规范化和骨架 css 页面。除此之外,提交按钮有效,但不会写入我的数据库。

PHP 到

<!DOCTYPE html>
<html lang="en">
<head>

<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Audio Search</title>
<meta name="description" content="">
<meta name="author" content="AlexR">

<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">

<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="skeleton.css">
<!-- <link rel="stylesheet" href="backbone.css"> -->
<style>
#container{
width:90%;
margin: 40px auto 0 auto;

}

background{
color: green;
}


</style>

<style>
body {background-color:lightgreen;}
h1 {color:blue;}
p {color:green;}
</style>



</head>
<body>

<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->



<div id="container">
<form>
<div class="row">
<div class="six columns">
<p>Thank you for your name and e-mail.</p>

<?php
error_reporting(E_ALL);
DEFINE('DB_USERNAME', '*****');
DEFINE('DB_PASSWORD', '*****');
DEFINE('DB_HOST', 'localhost');
DEFINE('DB_DATABASE', '*****');


echo "here!";



if (isset($_REQUEST['Experience'])){
$Age = $_REQUEST['Age'];
$Qualifications = $_REQUEST['Qualifications'];
$Experience = $_REQUEST['Experience'];


#echo "Thanks for your submission.";
$dbc = mysqli_connect(DB_HOST,DB_USERNAME,DB_PASSWORD,DB_DATABASE) OR die ('Could not connect to MySQL: '.mysqli_connect_error());
$q = "INSERT INTO `FinalForm`(`Age`, `Qualifications`, `Experience`) VALUES ('$Age','$Qualifications','$Experience' )";

$r = mysqli_query($dbc,$q);

# ^^^ Search submit results window

if ($r){echo "Results below";} else {echo "Your search found zero results";};



}










?>
</form>
</div>
<div>






</div>

</html>

不确定为什么 PHP 没有运行,但代码对我来说似乎很干净。

PHP 来自

<!DOCTYPE html>
<html lang="en">
<head>

<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Audio Shop Data Retrieval</title>
<meta name="description" content="">
<meta name="author" content="AlexR">

<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">

<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="skeleton.css">
<!-- <link rel="stylesheet" href="backbone.css"> -->
<style>
#container{
width:90%;
margin: 40px auto 0 auto;

}
h1 {color:lightgreen;}

</style>

<style>
body {background-color:lightgreen; color: green;}
h1 {color: lightgreen;}
p {color: lightgreen;}
header {
margin-top: -25px;
margin-left: -500px;
height: 100px;
width: 10000px;
background-color: green;
}
</style>

</head>
<header><h1>Audio Supply Retrieval</h1></header>
<body>

<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->



<div id="container" align="center">
<form>
<div class="row">
<div class="six columns">

<?php
error_reporting(E_ALL);
DEFINE('DB_USERNAME', 'arr07598');
DEFINE('DB_PASSWORD', 'Minty!23');
DEFINE('DB_HOST', 'localhost');
DEFINE('DB_DATABASE', 'arr07598')


$dbc = mysqli_connect(DB_HOST,DB_USERNAME,DB_PASSWORD,DB_DATABASE) OR die ('Could not connect to MySQL: '.mysqli_connect_error());
$q = "SELECT * FROM `FinalForm` ORDER BY `Category` ASC";
$r=@mysqli_query($dbc,$q);

if ($r) {
echo '<table><tr><td><b>Age</b></td><td><b>Qualifications</b></td><td><b>Experience</b></td></td>';
while($row=mysqli_fetch_array($r,MYSQLI_ASSOC)){
echo "<tr><td>$row[NameID]</td><td>$row[Age]</td><td>$row[Qualifications]</td><td>$row[Experience]</td></tr>";
}

echo "</select>";
};
echo "<p>";




?>

</form>
</div>
<div>






</div>
</body>
</html>

最佳答案

您的 input 类型 submit 是另一种形式,只有它作为输入字段。您需要在第一个表单中使用 submit 按钮 - 您要提交的表单

关于javascript - 清理了 SQL/PHP,它没有写入。不会选择你的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36600424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com