上我有一個PHP頁面的代碼,這是下面,我試圖將此signup.css但它不工作。在PHP管理員中,我可以看到CSS以SignUp.css的樣式顯示,我剛剛將我的主題目錄下的這個css放置在我的主題下,作爲SignUp.css,我嘗試過「Signup.css」,創建了一個css文件夾,這個CSS在那裏,並嘗試「CSS/SignUp.css」,但也沒有工作。請幫忙 。感謝您的時間CSS文件鏈接無法使用PHP頁面
<html>
<link href="Styles/Signup.css" media="all" rel="stylesheet" type="text/css"/>
<head>
<title>Create</title>
</head>
<body>
<?php
if($_POST['action']=='create'){
//include database configuration
$dbhost = "localhost";
$dbuser = "abc";
$dbpass = "xyz";
$dbname = "test";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname) or die ('Unable to select database!');
//sql insert statement
$sql="insert into user (firstname, lastname, username, Email, password)
values ('{$_POST['firstname']}','{$_POST['lastname']}','{$_POST['Email']}','{$_POST['username']}','{$_POST['password']}')";
//insert query to the database
if(mysql_query($sql)){
//if successful query
echo "New record was saved.";
}else{
//if query failed
die($sql.">>".mysql_error());
}
}
?>
<!--we have our html form here where user information will be entered-->
<div id="stylized" class="myform">
<form id="form" name="form" method="post" action="index.html">
<h1>Sign-up form</h1>
<label>Name
<span class="small"></span>
</label>
<input type="text" name="name" id="name" />
<label>Email
<span class="small"></span>
</label>
<input type="text" name="email" id="email" />
<label>Password
<span class="small">Min. size 6 chars</span>
</label>
<input type="text" name="password" id="password" />
<button type="submit">Sign-up</button>
<div class="spacer"></div>
</form>
</div>
</body>
</html>
除了在頭標籤內移動鏈接標籤,您可能還想將文件名和目錄名更改爲全部小寫。一些* nix服務器默認只使用小寫字母。 – Scott 2012-01-08 23:00:29