•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,159 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 181 | Replies: 1
![]() |
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........
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' >";•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
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.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the PHP Forum
- Previous Thread: Php Form
- Next Thread: closing the child window and refreshing the parent window



Linear Mode