This forum
IS NOT for technical questions. This area is for feedback regarding the P2P site.
Also, why did you not start a new topic? This one died a couple of days ago(I think)
Quote:
quote:Originally posted by junemo
hi, I hope someone can help me solve this problem.
error message:
Warning: session_start(): open(/tmp\sess_7b62efce76a65e4d203439b5c06670b5, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 3
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php: 3) in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 3
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php: 3) in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 3
Warning: main(common_db_only.php): failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 5
Warning: main(): Failed opening 'common_db_only.php' for inclusion (include_path='.;c:\php4\pear') in C:\Program Files\Apache Group\Apache2\htdocs\pro\POT\login\loginadmin.php on line 5
what is wrong the coding?
attach code:
<?php
session_unset();
session_start();
include("common_db_only.php");
if ($page==1)
{
$q1 = "Select * from pentadbir where adm_id='$txtpassword' AND adm_namapguna='$txtlog' and adm_statususer='A' ";
$r1=pg_send($q1);
$count1 = pg_numrows($r1);
if($count1==1)
{
$values=pg_fetch_array($r1,0,PGSQL_ASSOC);
$gaji = $values['adm_nogaji']."";
session_register('gaji');
//echo "Hi";
echo "<script language='Javascript'>location='/POT/permohonan/borang_kemaskini_cari.php'</script>";
exit;
}
else
{
echo "<script language='Javascript'>location='/POT/login/loginadmin.php?status=1'</script>";
// exit;
}
} // page=1
?>
<html>
<head>
<title>E-Procurement</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function Pengesahan(frm_login)
{
var ErrorMsg = ""
var ErrFlag = "False"
if (frm_login.txtlog.value == "")
{
ErrFlag = "True"
ErrorMsg +="* Please enter username. \n"
}
if (frm_login.txtpassword.value == "")
{
ErrFlag = "True"
ErrorMsg +="* Please enter password. \n"
}
if (ErrFlag == "True")
{
alert(ErrorMsg)
return false
}
else
return true
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="750" border="0" bgcolor="#000099" align="center" cellpadding="0" cellspacing="0" background="/POT/images/design05.jpg" height="89">
<tr>
<td rowspan="2" width="76" valign="top" height="70">
</td>
</tr>
</table>
<table width="750" border="2" height="256" align="center" bordercolor="#000066">
<tr>
<td height="14" bgcolor="#000099" bordercolor="#000099">
<table width="100%" border="0" bordercolor="#FFFFFF" cellspacing="0" cellpadding="0">
<tr width="750" height="5">
<td >
<div align="center"><?
$tarikh = gmdate('d F Y');
echo "Today : $tarikh Now : " ;
?><script type="text/javascript">
var d = new Date()
document.write(d.getHours())
document.write(":")
document.write(d.getMinutes())
document.write(":")
document.write(d.getSeconds())
</script></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" bordercolor="#FFFFFF" height="252">
<form name="frm_login" method="post" action="loginadmin.php?page=1" onsubmit="return Pengesahan(document.frm_login)" >
<table width="75%" border="0" align="center" height="154">
<tr>
<td colspan="3" height="2">
<p align="center"><b>ADMINISTRATOR</b>
</p>
<?
if($status==1)
{
echo"<b><center> Invalid username and password. <br>Please reenter.";
echo"</center></b>";
}
else
{
echo"<b><center>Please enter username and password: </center></b> ";
}?>
</td>
</tr>
<tr>
<td width="34%" height="20"> </td>
<td width="2%" height="20"> </td>
<td width="64%" height="20">
</td>
</tr>
<tr>
<td width="34%" height="17">Username</td>
<td width="2%" height="17">:</td>
<td width="64%" height="17">
<input type="text" name="txtlog" maxlength="20" size="30">
</td>
</tr>
<tr>
<td width="34%" height="19">Password</td>
<td width="2%" height="19">:</td>
<td width="64%" height="19">
<input type="password" name="txtpassword" maxlength="20" size="30">
</td>
</tr>
<tr>
<td colspan="3" height="14" align="right">
<div align="center"> <b>
<input type="submit" name="Hantar" value="Submit">
<input type="reset" name="Batal" value="Cancel">
</b></div>
</td>
</tr>
</table>
</form>
<div align="center">
<p>Copyright
© 2001-2002 PTM, UM. All rights reserved. </p>
</div>
</td>
</tr>
</table>
</body>
</html>
Thank you.
from,
junemo
|
Ben Horne
Madison Area Technical College student
NOT a Wiley/Wrox Employee
-------------------------
http://community.webshots.com/user/valerian114
Go there. I have a lot of awesome photos that I rendered myself
"There are two kinds of people in the world: Those who claim to be Flash junkies and those who actually are Flash junkies"