Hey! This seems to be simple, but I'm really stuck..this is the code to a "Job Wizard", the users, who are employers, select options....and are accordingly assigned days, day1, day2 or day3, according to options selected...on a Seperate confirmation popup page...the problem is that I now need the corresponding dates to be displayed as well! i.e September 12, September 13 or September 14....corressponding to day1, day2 or day3......but its not allowing me to enter text...please help me out .......Pronto!!!
Thanks!
Here's the code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>“Choose Your Day” Wizard</title>
<SCRIPT language="Javascript">
function openTarget (form, features, windowName) {
if (!windowName)
windowName = 'formTarget' + (new Date().getTime());
form.target = windowName;
open ('', windowName, features);
}
</SCRIPT>
<link href="../styles/mcc1_ie.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-size: 14px}
.style3 {font-size: 16px}
-->
</style>
</head>
<body>
<?
$findday=isset($POST["findday"]) ? $POST["findday"] : "";
if(strcmp($findday,"true")==0)
{
$gflag=0;
$bflag=0;
$rflag=0;
foreach($_POST as $key=>$value)
{
if(strstr($key,"green"))
{
$gflag=1;
}
if(strstr($key,"blue"))
{
$bflag=1;
}
if(strstr($key,"red"))
{
$rflag=1;
}
}
if($gflag==1)
$day= 1;
if($bflag==1)
$day= 3;
if($rflag==1 || ($gflag==1 && $bflag==1))
$day= 2;
print("<br><center><b><h4>The day you should attend the Fall Career Fair is day, </h4></b>". $day);
print("<br><center><b><h4>Thank you for choosing to attend our Fall Career Fair, 2006.<h4></b>");
print("<br><center><b><h4>Registrations will be accepted beginning July 5.<h4></b>");
print("<BR> <A href=\"javascript:window.close()\">Close</A></center> ");
mysql_connect($server, $username, $password);
mysql_select_db($database);
mysql_query("insert into ".$table."(email,day) values('".$_POST["email"]."',".$day.")");
mysql_close();
/$inputString = $_POST["email"].": ".$day." , ";
$fp = fopen( "dump.txt" , "a+" );
fwrite($fp, $inputString);
fclose($fp);
/
}
else
{
?>
<center>
<p><img src="../images/CU_MCC_logo.jpg" alt="" width="600" height="145" /></p>
<p class="header">Fall Career Fair 2006 </p>
<p><b>Choose Your Day Wizard</b></p>
</center>
<span class="intro style2">Confused about which day of the career fair to attend?<BR>
Use this helpful wizard to decide wich day you should attend. Which day depends on what types of majors or students you want to reach.<br />
Check all of the following areas you are recruiting:</span><BR />
<BR />
<form name=wizform action=wizard.php method=post ONSUBMIT="openTarget(this, 'width=600,height=600,resizable=4,scrollbars=3'); return true;" target="newpopup">
<BR />
<input type="checkbox" name="green 1" />Business and administrative (management, marketing, accounting, finance, economics, MBA, and parks, recreation & tourism management)<BR /><BR />
<input type="checkbox" name="green 2" /> Social and behavioral science (psychology, sociology, political science, health science)<BR /><BR />
<input type="checkbox" name="green 3" /> Liberal arts (communications, English, history, language & international trade/health)<BR /><BR />
<input type="checkbox" name="red" /> Graphic communications or Packaging science<BR /><BR />
<input type="checkbox" name="blue 1" /> Engineering (all areas)<br /><BR />
<input type="checkbox" name="blue 1" /> Construction science, architecture, landscape architecture<BR /><BR />
<input type="checkbox" name="blue 2" /> Materials science (textiles, ceramics, polymers, fibers)<br /><BR />
<input type="checkbox" name="blue 3" /> Science (biology, chemistry, physics, geology)<br /><BR />
<input type="checkbox" name="blue 4" /> Biotechnology (biosystems engineering, bioengineering)<br /><BR />
<input type="checkbox" name="blue 5" /> Environmental/Natural resources<br /><BR />
<input type="checkbox" name="blue 6" /> Computer science/Computer information systems<br /><BR />
<BR />
Please provide your email <input type=text name=email />
<BR />
<BR />
<input type=hidden name=findday value=true />
<input type=submit value="Submit" />