Wrox Programmer Forums
|
Forum and Wrox.com Feedback Post your suggestions for improving the Forums or Wrox.com or questions for the staff here. "Where can I find the code for my book?"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Forum and Wrox.com Feedback section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 5th, 2004, 09:31 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default ?????

I just noticed this a few minutes ago. I was on the PHP Forums to check on whether Nik or Rich had posted any FAQ topics. They did (congratutlations to you guys:)). So, I pushed the Back button in Internet Explorer. Suddenly, I realized I was no longer logged in. This is kinda hard to explain since it's swimming around in my mind at this time. Can someone check on this?

Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"
__________________
Ben Horne
-------------------------
I don\'t want to sound like I haven\'t made any mistakes. I\'m confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
  #2 (permalink)  
Old April 5th, 2004, 09:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

this isn't critical- just log back in.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #3 (permalink)  
Old April 5th, 2004, 09:51 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

I found out that if I went forward one page, I would get my "logged in" status back.....So either way, I'm fine

Quote:
quote:Originally posted by Hal Levy
 this isn't critical- just log back in.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Ben Horne
Madison Area Technical College student
-------------------------
http://community.webshots.com/user/valerian114

Go there. I have a lot of awesome photos that I rendered myself

"A Person Who Claims To Be A Flash Junkie Isn't Really A Flash Junkie Unless He Can Prove It"
  #4 (permalink)  
Old April 5th, 2004, 09:51 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is also possibile that page you are getting by clicking the BACK button is coming from the browser cache. try to refresh the page


Charul Shukla
  #5 (permalink)  
Old April 6th, 2004, 12:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Right. If you click the "back" button, you're not sending a new HTTP request for the last page you saw, you're just asking the browser to display the page from it's history (cache).

This is the case unless the previous page received data from you via an HTTP POST form. The browser would then notify you that the page cannot be reloaded without resubmitting the POSTed data.


Take care,

Nik
http://www.bigaction.org/
  #6 (permalink)  
Old April 8th, 2004, 10:15 PM
Authorized User
 
Join Date: Apr 2004
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to junemo
Default

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">&nbsp;</td>
            <td width="2%" height="20">&nbsp;</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
          &copy; 2001-2002 PTM, UM. All rights reserved. </p>
        </div>
    </td>
  </tr>
</table>
</body>
</html>


Thank you.
from,
junemo


  #7 (permalink)  
Old April 8th, 2004, 10:38 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

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">&nbsp;</td>
            <td width="2%" height="20">&nbsp;</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
         &copy; 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"
  #8 (permalink)  
Old April 9th, 2004, 08:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This topic belongs in the proper forum- not attached to a random posting in a radom forum.

I'd look in the PHP forum for help.

I am locking this topic to prevent further missposts on it.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.