hi

i have a application where the user can post resume for 'N' no of job orders when the user clicks apply it should get his username & pss.Next time when he is applying for another job order it should not ask him the uss &pss ...........i tried the below code it did not work........

<html><head>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!--   
function WindowC()
{  window.open("http://www.website.com/web_login.html","mywindow","status=1,height=200,width=310,resizable=0") }
-->   </SCRIPT>  </head>
<body bgcolor="#f1f3f3"> 
<?php
$var=$_GET['var'];
$link=mysql_connect($hostname, $username, $password);
mysql_select_db($dbid) or die("unable to connect");
echo $_SESSION['un'];
function login()
{
if($_SESSION['un']='')
{
echo $_SESSION['un'];
 print "<script>";
print " window.location='http://www.website.com/web_login.html'";
print "</script>"; 
}
else
{
print "<script>";
print " window.location='http://www.website.com/web_login2.php'";
print "</script>"; 
}
}
$result=mysql_query("select * from jopposting where jid='$var'");
while($line = mysql_fetch_array($result))
 {
$_SESSION["obid"]=$line[0];

<input type='submit' name='submit' value='Apply Online' onSubmit=login(); style='height :2em; width :7em; font-weight:bold; font-size:0.7em' >";

When the user clicks apply for the first time, get his username (and password ?) from the table. Add it to the session variable. Then check if the session variable exists. If it does, then don't ask him for username and password. If session variable doesn't exist, ask him for username and password and add it to the session.

Comments
Simple and comprehend
This article has been dead for over six months. Start a new discussion instead.