我想在文本框中显示带空格的值.数据库值为"usman road".但在文本框中它只显示"usman".
$value="select * from employee where e_id=$ses";
$value1=mysql_query($value);
$vfet=mysql_fetch_assoc($value1);
echo '<p>First Name<input type="text" name="f" size=18 maxlength=50 style="background-color:transparent;border:0px solid white;" readonly value='.$vfet['e_first_name'].'></p>';
Run Code Online (Sandbox Code Playgroud) 我的子域是示例,考虑我的域名是 demodomain。我想链接“www.google.com”。我的 href 将链接到“ http://www.sample.demodomain.com/www.google.com ”。
html code:
<a target="_blank" href="www.google.com">click me</a>
Run Code Online (Sandbox Code Playgroud)
我想被重定向到 www.google.com.但现在我被重定向到http://www.sample.demodomain.com/www.google.com。
我想检查数据库中是否存在文本框中的值,如果数据库中存在该值而未刷新整个页面,则清除该框.
HTML:
<p>Email<input type="text" name="email" id="email" size=18 maxlength=50 required></p>
Run Code Online (Sandbox Code Playgroud)
查询:
$echeck="select email from register where email='$email'";
$echk=mysql_query($echeck);
$ecount=mysql_num_rows($echk);
if($ecount!=0)
{
echo ("<SCRIPT LANGUAGE='JavaScript'>
var asign=document.getElementById(email); //now show null value
asign.value="";
</SCRIPT>");
}
Run Code Online (Sandbox Code Playgroud)
如果我使用警报,它将刷新页面.
window.alert('Email Id already exist');
Run Code Online (Sandbox Code Playgroud)