Jump to content

Need help with submit button


joergermeister

Recommended Posts

Hope someone can help me on this one. Below are the two sections (php and html) where i believe i need to make changes so pages go to the next page in the application and not just refresh itself after pressing the submit button.

 

<?
include_once "accesscontrol.php";
include_once "../lang/$lang/header.html";
include_once "../lang/$lang/jobseekers/side1.html";

if(!empty($del))
{


if(!empty($experienceid))
{
$q6 = "delete from experience where experienceid = \"$experienceid\" and jobseekerid = \"$a1[jobseekerid]\"";
$r6 = mysql_query($q6) or die(mysql_error());

include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>
<META HTTP-EQUIV="refresh" content="1;URL=onlinecv.php?section=Work Experience"> 
<?
exit;
}

if(!empty($referenceid))
{
$q6 = "delete from reference where referenceid = \"$referenceid\" and jobseekerid = \"$a1[jobseekerid]\"";
$r6 = mysql_query($q6) or die(mysql_error());

include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>
<META HTTP-EQUIV="refresh" content="1;URL=onlinecv.php?section=References"> 
<?
exit;
}

if(!empty($educationid))
{
$q6 = "delete from education where educationid = \"$educationid\" and jobseekerid = \"$a1[jobseekerid]\"";
$r6 = mysql_query($q6) or die(mysql_error());

include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>
<META HTTP-EQUIV="refresh" content="1;URL=onlinecv.php?section=Education"> 
<?
exit;
}

if(!empty($languageid))
{
$q6 = "delete from language where languageid = \"$languageid\" and jobseekerid = \"$a1[jobseekerid]\"";
$r6 = mysql_query($q6) or die(mysql_error());

include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>
<META HTTP-EQUIV="refresh" content="1;URL=onlinecv.php?section=Languages"> 
<?
exit;
}

if(!empty($skillid))
{
$q6 = "delete from skills where skillid = \"$skillid\" and jobseekerid = \"$a1[jobseekerid]\"";
$r6 = mysql_query($q6) or die(mysql_error());

include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>
<META HTTP-EQUIV="refresh" content="1;URL=onlinecv.php?section=Skills"> 
<?
exit;
}


}


if(isset($submit))
{

$q4 = "select * from resumes where jobseekerid = \"$a1[jobseekerid]\"";
$r4 = mysql_query($q4) or die(mysql_error(Error5));
$a4 = mysql_fetch_array($r4);

$EXday = date('d', mktime(0,0,0,0, date(d) + 0, 0));
$EXmonth = date('m', mktime(0,0,0, date(m), date(d) + 0, 0));
$EXyear = date('Y', mktime(0,0,0,date(m) ,date(d) + 0, date(Y)));

if($section == "Career Objective")
{


$query = "update resumes set 
headline = \"$headline\",
objective = \"$objective\",
relocate = \"$relocate\",
available = \"$available\",
online = \"Yes\",
onlinedate = \"$EXmonth/$EXday/$EXyear\"
where jobseekerid = \"$a1[jobseekerid]\"";

$result = mysql_query($query) or die(mysql_error());


}

elseif($section == "Job Preferences")
{

if (is_array($country))
{
$country = implode(", " , $country);
}
if (is_array($category))
{
$category = implode(", " , $category);
}
if (is_array($level))
{
$level = implode(", " , $level);
}

$query = "update resumes set 
title = \"$title\",
hour = \"$hour\",
online = \"Yes\",
alertstatus = \"$alertstatus\",
onlinedate = \"$EXmonth/$EXday/$EXyear\"
where jobseekerid = \"$a1[jobseekerid]\"";

$result = mysql_query($query) or die(mysql_error());

if(!empty($country))
{
       $q5 = "update resumes set
              country = \"$country\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}
else
{
       $q5 = "update resumes set
              country = \"$country2\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}

if(!empty($level))
{
       $q5 = "update resumes set
              level = \"$level\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}
else
{
       $q5 = "update resumes set
              level = \"$level2\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}

if(!empty($category))
{
       $q5 = "update resumes set
              category = \"$category\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}
else
{
       $q5 = "update resumes set
              category = \"$category2\"
                      where jobseekerid = \"$a1[jobseekerid]\"";

       $r5 =  mysql_query($q5) or die(mysql_error(Error3));
}


}
elseif($section == "Work Experience")
{

if(empty($experienceid))
{
$query = "insert into experience set
jobseekerid = \"$a1[jobseekerid]\",
companyname = \"$companyname\",
location = \"$location\",
title = \"$title\",
start = \"$start\",
end = \"$end\",
description = \"$description\"";
}
else
{
$query = "update experience set 
companyname = \"$companyname\",
location = \"$location\",
title = \"$title\",
start = \"$start\",
end = \"$end\",
description = \"$description\"
where experienceid = \"$experienceid\"";
}

$result = mysql_query($query) or die(mysql_error());
}
elseif($section == "References")
{

if(empty($referenceid))
{
$query = "insert into reference set
jobseekerid = \"$a1[jobseekerid]\",
name = \"$name\",
company = \"$company\",
position = \"$position\",
phone = \"$phone\",
email = \"$email\"";
}
else
{
$query = "update reference set 
name = \"$name\",
company = \"$company\",
position = \"$position\",
phone = \"$phone\",
email = \"$email\" 
where referenceid = \"$referenceid\"";
}

$result = mysql_query($query) or die(mysql_error());
}
elseif($section == "Education")
{

if(empty($educationid))
{
$query = "insert into education set
jobseekerid = \"$a1[jobseekerid]\",
name = \"$name\",
location = \"$location\",
country = \"$country\",
degree = \"$degree\",
end = \"$end\",
description = \"$description\"";
}
else
{
$query = "update education set 
name = \"$name\",
location = \"$location\",
country = \"$country\",
degree = \"$degree\",
end = \"$end\",
description = \"$description\"
where educationid = \"$educationid\"";
}

$result = mysql_query($query) or die(mysql_error());
}
elseif($section == "Languages")
{

if(empty($languageid))
{
$query = "insert into language set
jobseekerid = \"$a1[jobseekerid]\",
language = \"$language\",
proficiency = \"$proficiency\"";
}
else
{
$query = "update language set 
language = \"$language\",
proficiency = \"$proficiency\"
where languageid = \"$languageid\"";
}

$result = mysql_query($query) or die(mysql_error());
}
elseif($section == "Skills")
{

if(empty($skillid))
{
$query = "insert into skills set
jobseekerid = \"$a1[jobseekerid]\",
skill = \"$skill\",
level = \"$level\"";
}
else
{
$query = "update skills set 
skill = \"$skill\",
level = \"$level\"
where skillid = \"$skillid\"";
}

$result = mysql_query($query) or die(mysql_error());
}
elseif($section == "Settings")
{

$query = "update resumes set 
onlinestatus = \"$allowcvcontact\",
uploadstatus = \"$allowupcvcontact\",
alertstatus = \"$alertstatus\"
where jobseekerid = \"$a1[jobseekerid]\"";

$result = mysql_query($query) or die(mysql_error());

}
elseif($section == "Info")
{

$query = "update resumes set 
online = \"Yes\",
info = \"$info\"
where jobseekerid = \"$a1[jobseekerid]\"";

$result = mysql_query($query) or die(mysql_error());
}

else
{

}

$message = "resume saved";

}

$q7 = "select * from resumes where jobseekerid = \"$a1[jobseekerid]\"";
$r7 = mysql_query($q7) or die(mysql_error());
$a7 = mysql_fetch_array($r7);


include_once "../lang/$lang/jobseekers/onlineresume.html";
include_once "../lang/$lang/jobseekers/side2.html";
include_once "../lang/$lang/footer.html";
?>

 

html that uses above

 

<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="left" class="tcat">Online Application</td>
</tr>
<tr>
<td align="left" valign="top" class="tborder">
<?
$q6 = "select * from content where lang = \"$lang\" and section = \"Jobseekers\" and title = \"Online CV\""; 
$r6 = mysql_query($q6) or die(mysql_error(Error5));
$a6 = mysql_fetch_array($r6);

echo "$a6[content]";
?>

<table width="100%" border="0" cellspacing="0" cellpadding="5">
<form method=post>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>
<tr>
<td valign="top" colspan='2'><br></td>
</tr>
<tr>
<td valign="top" colspan='2'>
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>
<?
if($message == "resume saved")
{
echo "
<tr>
<td colspan='2' align='left'><font color='red'><b>$section updated. If you wish to update any other section of your Profile/Application, please click on the link to the relevant section. <a href='search.php'>Click here</a> to begin searching for a job.</b></font>
</td>
</tr>";
}
?>


<?
if($section == "Career Objective")
{
?>
<tr>
<td colspan="2" align="left">Enter a headline that will reflect your career. e.g. Results Oriented QA Specialist, Great Organiser <span class="tcat">(<strong>Step 1</strong>)</span></td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Headline:</td>
<td align="left">
<input type="text" name="headline" value="<?=$a7[headline]?>">
</td>
</tr>
<tr>
<td colspan="2" align="left">Please specify the goals you want to achieve in your life. Include your skills, area of interests and specialisations.</td>
</tr>
<tr>
<td align="left" valign="top">Career Objective:</td>
<td align="left"><textarea cols="45" rows="8" name="objective"><?=$a7[objective]?></textarea></td>
</tr>
<tr>
<td colspan="2" valign="top">Please enter the earliest date you are available to work. (mm/dd/yyyy)</td>
</tr>
<tr>
<td align="left" valign="top">Date:</td>
<td align="left" valign="top"><input name="available" type="text" value="<?=$a7[available]?>"></td>
</tr>
<tr>
<td align="left" valign="top">Are you willing to relocate:</td>
<td align="left" valign="top">
<?
if($a7[relocate] == 'Yes')
{
echo "
<input type=radio name=relocate value='Yes' checked>Yes
<input type=radio name=relocate value='No'>No
";
}
else
{
echo "
<input type=radio name=relocate value='Yes'>Yes
<input type=radio name=relocate value='No' checked>No
";
}
?>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="middle">

<strong>First click </strong>
<img src="../../../images/arrow_blue.gif" width="20" height="18" alt="arrow" />
<input name="submit" type="submit" value="Save"/> 
<strong>then</strong> <strong>click</strong> <a href="http://www.expediterjobsonline.com/jobseekers/onlinecv.php?section=Job%20Preferences"><strong>here</strong></a> <strong>to go to  next Step</strong></td>
</tr>
</form>
</table>

<?
}
elseif($section == "Job Preferences")
{
?>
<tr>
<td colspan="2" align="left">Please enter your preferred job settings. <span class="tcat">(<strong>Step 2</strong>)</span></td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Preferred Job Title:</td>
<td align="left">
<input type="text" name="title" value="<?=$a7[title]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Preferred Job Hours:</td>
<td align="left">
<input type=radio name=hour value="" checked>All Hours
<?
$hour_query=mysql_query("select * from hours order by hour asc");
while ($hour_result=mysql_fetch_array($hour_query))
{
if($hour_result[hour] == "$a7[hour]")
{
?>
<input type=radio name=hour value="<?=$hour_result[hour]?>" checked><?=$hour_result[hour]?>
<?
}
else
{
?>
<input type=radio name=hour value="<?=$hour_result[hour]?>"><?=$hour_result[hour]?>
<?
}
}
?>
</td>
</tr>
<tr>
<td colspan="2" align="left">Please select the job categories that best suit your Application.</td>
</tr>
<?
if(!empty($a7[category]))
{
echo "
<tr>
<td colspan='2' align='left'><b>You previously selected:</b> <font color=red>$a7[category]</font></td>
</tr>
";
}
?>
<tr>
<td align="left" valign="top">Select Category:</td>
<td><select name=category[] multiple>
<?
$category_query=mysql_query("select * from categories order by category asc");
while ($category_result=mysql_fetch_array($category_query))
{
?>
<option value="<?=$category_result['category']?>" <? if($a1[category]==$category_result['category']){echo 'selected';}?>><?=$category_result['category']?></option>
<?
}
?>
</select></td>
</tr>
<tr>
<td colspan="2" valign="top">Please enter your experience level, eg. Student, Entry Level</td>
</tr>
<?
if(!empty($a7[level]))
{
echo "
<tr>
<td colspan='2' align='left'><b>You previously selected:</b> <font color=red>$a7[level]</font></td>
</tr>
";
}
?>
<tr>
<td align="left" valign="top">Experience Level:</td>
<td align="left" valign="top"><select name=level[] multiple>
<?
$level_query=mysql_query("select * from levels order by level asc");
while ($level_result=mysql_fetch_array($level_query))
{
echo '<option value="'.$level_result['level'].'"';
if (strstr($level_result['level'],$level_result['level']))
echo '>'.$level_result['level'].'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="left">Please enter the locations where your would like to work.</td>
</tr>
<?
if(!empty($a7[country]))
{
?>
<tr>
<td colspan='2' align='left'><b>You previously selected:</b> <font color=red><?=$a7[country]?></font></td>
</tr>
<?
}
?>
<tr>
<td align="left" valign="top">Select Location:</td>
<td><select name=country[] multiple>
<?
$country_query=mysql_query("select * from countries order by country asc");
while ($country_result=mysql_fetch_array($country_query))
{
?>
<option value="<?=$country_result['country']?>" <? if($a1[country]==$country_result['country']){echo '';}?>><?=$country_result['country']?></option>
<?
}
?>
</select>
</td>
</tr>
<tr>
<td align="left" valign="top"> 
Accept email alerts:</td>
<td align="left">
<?
if($a7[alertstatus] == 'Yes')
{
echo "
<input type=radio style='border: 0px' name=alertstatus value=Yes checked>Yes
<input type=radio style='border: 0px' name=alertstatus value=No>No
";
}
else
{
echo "
<input type=radio style='border: 0px' name=alertstatus value=Yes>Yes
<input type=radio style='border: 0px' name=alertstatus value=No checked>No
";
}
?>
</td>
</tr>
<tr>
<td align="center" colspan="2">
  <strong>Then click </strong> <img src="../../../images/arrow_blue.gif" width="20" height="18" alt="arrow" />
  <?
if(!empty($a7[country]))
{
echo "<input type='hidden' name='country2' value='$a7[country]'>";
}
if(!empty($a7[category]))
{
echo "<input type='hidden' name='category2' value='$a7[category]'>";
}
if(!empty($a7[level]))
{
echo "<input type='hidden' name='level2' value='$a7[level]'>";
}
?>
  <input name="submit" type="submit" value="Save"/>
<strong>and</strong> <strong>click</strong> <a href="http://www.expediterjobsonline.com/jobseekers/onlinecv.php?section=Settings"><strong>here</strong></a> <strong>to go to  next Step</strong></td>
</tr>
</form>
</table>
<?
}
elseif($section == "Work Experience")
{
?>
<tr>
<td colspan="2" align="left">Please enter your work experience. Your entries will appear on your  Application in chronological order starting with the most recent.</td>
</tr>
<tr>
<td colspan="2" align="left"><b>Work experience you currently have listed:</b>
</br>
<?
$query = mysql_query("SELECT * FROM experience where jobseekerid = \"$a1[jobseekerid]\" order by experienceid desc");
while($row = mysql_fetch_array( $query )) 
{
?>
<a href="onlinecv.php?section=<?=$section?>&experienceid=<?=$row[experienceid]?>"><?=$row[title]?></a> | <a href='onlinecv.php?del=yes&experienceid=<?=$row[experienceid]?>'><font color=#ff0000>Delete</font></a><br>
<?
}

$q7 = "select * from experience where experienceid = \"$experienceid\"";
$r7 = mysql_query($q7) or die(mysql_error(Error5));
$a7 = mysql_fetch_array($r7);
?>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>

<tr>
<td align="left" valign="top" width="30%">Company Name:</td>
<td align="left">
<input type="text" name="companyname" value="<?=$a7[companyname]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Company Location:</td>
<td align="left">
<input type="text" name="location" value="<?=$a7[location]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Job Title:</td>
<td align="left">
<input type="text" name="title" value="<?=$a7[title]?>"></td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Start Date:</td>
<td align="left">
<input type="text" name="start" value="<?=$a7[start]?>">
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">End Date:</td>
<td align="left">
<input type="text" name="end" value="<?=$a7[end]?>">
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Description:</td>
<td align="left"><textarea cols="45" rows="8" name="description"><?=$a7[description]?></textarea></td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Add"/></td>
</tr>
</form>
</table>
<?
}

elseif($section == "References")
{
?>
<tr>
<td colspan="2" align="left">Please enter your references below. Please inform your referees before adding their details.</td>
</tr>
<tr>
<td colspan="2" align="left"><b>Referees you currently have listed:</b>
</br>
<?
$query = mysql_query("SELECT * FROM reference where jobseekerid = \"$a1[jobseekerid]\" order by referenceid desc");
while($row = mysql_fetch_array( $query )) 
{
?>
<a href="onlinecv.php?section=<?=$section?>&referenceid=<?=$row[referenceid]?>"><?=$row[name]?></a> | <a href='onlinecv.php?del=yes&referenceid=<?=$row[referenceid]?>'><font color=#ff0000>Delete</font></a><br>
<?
}

$q7 = "select * from reference where referenceid = \"$referenceid\"";
$r7 = mysql_query($q7) or die(mysql_error(Error5));
$a7 = mysql_fetch_array($r7);
?>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>

<tr>
<td align="left" valign="top" width="30%">Name:</td>
<td align="left">
<input type="text" name="name" value="<?=$a7[name]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Company:</td>
<td align="left">
<input type="text" name="company" value="<?=$a7[company]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Position:</td>
<td align="left">
<input type="text" name="position" value="<?=$a7[position]?>"></td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Phone:</td>
<td align="left">
<input type="text" name="phone" value="<?=$a7[phone]?>">
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Email:</td>
<td align="left">
<input type="text" name="email" value="<?=$a7[email]?>">
</td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Add"/></td>
</tr>
</form>
</table>
<?
}


elseif($section == "Education")
{
?>
<tr>
<td colspan="2" align="left">Please enter your education below. Your entries will appear on your Application in chronological order starting with the most recent.</td>
</tr>
<tr>
<td colspan="2" align="left"><b>Places of education you currently have listed:</b>
</br>
<?
$query = mysql_query("SELECT * FROM education where jobseekerid = \"$a1[jobseekerid]\" order by educationid desc");
while($row = mysql_fetch_array( $query )) 
{
?>
<a href="onlinecv.php?section=<?=$section?>&educationid=<?=$row[educationid]?>"><?=$row[name]?></a> | <a href='onlinecv.php?del=yes&educationid=<?=$row[educationid]?>'><font color=#ff0000>Delete</font></a><br>
<?
}

$q7 = "select * from education where educationid = \"$educationid\"";
$r7 = mysql_query($q7) or die(mysql_error(Error5));
$a7 = mysql_fetch_array($r7);
?>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>

<tr>
<td align="left" valign="top" width="30%">Institute Name:</td>
<td align="left">
<input type="text" name="name" value="<?=$a7[name]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Location:</td>
<td align="left">
<input type="text" name="location" value="<?=$a7[location]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Country:</td>
<td align="left">
<SELECT NAME="country">
<option value="Select One" selected>Select One</option>
<?
$country_query=mysql_query("select * from countries order by country asc");
while ($country_result=mysql_fetch_array($country_query))
{
echo '<option value="'.$country_result['country'].'"';
if (strstr($country_result['country'],$country_result['country']))
echo '>'.$country_result['country'].'</option>';
}
?>
<option value="International">International</option>
</SELECT>
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Qualification:</td>
<td align="left">
<input type="text" name="degree" value="<?=$a7[degree]?>">
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Completion Date:</td>
<td align="left">
<input type="text" name="end" value="<?=$a7[end]?>">
</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Description:</td>
<td align="left"><textarea cols="45" rows="8" name="description"><?=$a7[description]?></textarea></td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Add"/></td>
</tr>
</form>
</table>
<?
}


elseif($section == "Languages")
{
?>
<tr>
<td colspan="2" align="left">Please enter the languages you can speak below.</td>
</tr>
<tr>
<td colspan="2" align="left"><b>Languages you currently have listed:</b>
</br>
<?
$query = mysql_query("SELECT * FROM language where jobseekerid = \"$a1[jobseekerid]\" order by languageid desc");
while($row = mysql_fetch_array( $query )) 
{
?>
<a href="onlinecv.php?section=<?=$section?>&languageid=<?=$row[languageid]?>"><?=$row[language]?></a> | <a href='onlinecv.php?del=yes&languageid=<?=$row[languageid]?>'><font color=#ff0000>Delete</font></a><br>
<?
}

$q7 = "select * from language where languageid = \"$languageid\"";
$r7 = mysql_query($q7) or die(mysql_error(Error5));
$a7 = mysql_fetch_array($r7);
?>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>

<tr>
<td align="left" valign="top" width="30%">Language:</td>
<td align="left">
<input type="text" name="language" value="<?=$a7[language]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Proficiency:</td>
<td align="left">
<SELECT NAME="proficiency">
<OPTION VALUE="<?=$a7[proficiency]?>" selected><?=$a7[proficiency]?></OPTION>
<option value="Basic">Basic</option>
<option value="Good">Good</option>
<option value="Excellent">Excellent</option>
</SELECT>
</td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Add"/></td>
</tr>
</form>
</table>
<?
}
elseif($section == "Skills")
{
?>
<tr>
<td colspan="2" align="left">Please enter any skills that you possess.</td>
</tr>
<tr>
<td colspan="2" align="left"><b>Skills you currently have listed:</b>
</br>
<?
$query = mysql_query("SELECT * FROM skills where jobseekerid = \"$a1[jobseekerid]\" order by skillid desc");
while($row = mysql_fetch_array( $query )) 
{
?>
<a href="onlinecv.php?section=<?=$section?>&skillid=<?=$row[skillid]?>"><?=$row[skill]?></a> | <a href='onlinecv.php?del=yes&skillid=<?=$row[skillid]?>'><font color=#ff0000>Delete</font></a><br>
<?
}

$q7 = "select * from skills where skillid = \"$skillid\"";
$r7 = mysql_query($q7) or die(mysql_error(Error5));
$a7 = mysql_fetch_array($r7);
?>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<hr style='background-color: rgb(204, 204, 204);' width='100%' size='1' noshade='noshade' color='#cccccc'>
</td>
</tr>

<tr>
<td align="left" valign="top" width="30%">Skill:</td>
<td align="left">
<input type="text" name="skill" value="<?=$a7[skill]?>">
</td>
</tr>
<tr>
<td align="left" valign="top">Level:</td>
<td align="left">
<SELECT NAME="level">
<OPTION VALUE="<?=$a7[level]?>" selected><?=$a7[level]?></OPTION>
<option value="Basic">Basic</option>
<option value="Intermediate">Intermediate</option>
<option value="Advanced">Advanced</option>
</SELECT>
</td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Add"/></td>
</tr>
</form>
</table>
<?
}


elseif($section == "Settings")
{
?>
<tr>
<td align="left" valign="top"> 
Allow employers to view your online Application</td>
<td>
<?
if($a7[onlinestatus] == 'Yes')
{
echo "
<input type=radio style='border: 0px' name=allowcvcontact value=Yes checked>Yes
<input type=radio style='border: 0px' name=allowcvcontact value=No>No
";
}
else
{
echo "
<input type=radio style='border: 0px' name=allowcvcontact value=Yes>Yes
<input type=radio style='border: 0px' name=allowcvcontact value=No checked>No
";
}
?>
</td>
</tr>
<tr>
<td align="left" valign="top"> 
Allow employers to view your uploaded Application:</td>
<td align="left">
<?
if($a7[uploadstatus] == 'Yes')
{
echo "
<input type=radio style='border: 0px' name=allowupcvcontact value=Yes checked>Yes
<input type=radio style='border: 0px' name=allowupcvcontact value=No>No
";
}
else
{
echo "
<input type=radio style='border: 0px' name=allowupcvcontact value=Yes>Yes
<input type=radio style='border: 0px' name=allowupcvcontact value=No checked>No
";
}
?>
</td>
</tr>

<tr>
<td align="left" valign="top"> 
Accept email alerts:</td>
<td align="left">
<?
if($a7[alertstatus] == 'Yes')
{
echo "
<input type=radio style='border: 0px' name=alertstatus value=Yes checked>Yes
<input type=radio style='border: 0px' name=alertstatus value=No>No
";
}
else
{
echo "
<input type=radio style='border: 0px' name=alertstatus value=Yes>Yes
<input type=radio style='border: 0px' name=alertstatus value=No checked>No
";
}
?>
</td>
</tr>

<tr>
<td align="center" colspan="2"><strong>Last click </strong> <img src="../../../images/arrow_blue.gif" width="20" height="18" alt="arrow" />
  <input name="submit" type="submit" value="Save"/>
  <strong>Steps 4-10 are optional</strong></td>
</tr>
</form>
</table>
<?
}
elseif($section == "Info")
{
?>
<tr>
<td colspan="2" align="left">Please enter any additional information you want to include in your Application.</td>
</tr>
<tr>
<td align="left" valign="top" width="30%">Additional Info:</td>
<td align="left"><textarea cols="45" rows="8" name="info"><?=$a7[info]?></textarea></td>
</tr>
<tr>
<td align="center" colspan="2"><input name="submit" type="submit" value="Save"/></td>
</tr>
</form>
</table>
<?
}
else
{

}
?>

</td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" width="100%">
  <form method="post">
  </form>
  <tbody>
    <tr>
      <td colspan="2" valign="top"><hr color="#cccccc" size="1" width="100%" noshade="noshade" /></td>
    </tr>
  </tbody>
</table>
<b>Application Sections</b>
<table cellspacing="0" cellpadding="3" width="100%" border="0">
  <tbody>
    <tr>
      <td valign="top"><a href="onlinecv.php?section=Career Objective">1. Apllication page <strong>1</strong></a></td>
      <td valign="top"><a href="onlinecv.php?section=Work Experience">4. Application page <strong>4</strong> (optional)</td>
      <td valign="top"><a href="onlinecv.php?section=Languages">7. Languages</a></td>
      <td valign="top"><a href="onlinecv.php?section=Info">10. Additional Info</a></td>
    </tr>
    <tr>
      <td valign="top"><a href="onlinecv.php?section=Job Preferences">2. Application page <strong>2</strong></a><strong><a href="onlinecv.php?section=Education"></a></strong></td>
      <td valign="top"><a href="onlinecv.php?section=References">5. Application page <strong>5</strong> (optional)</a></td>
      <td valign="top"><a href="onlinecv.php?section=Skills">8. Application page6 (optional)</a></td>
      <td valign="top"> </td>
    </tr>
    <tr>
      <td valign="top"><a href="onlinecv.php?section=Settings">3. Application page <strong>3</strong></a></td>
      <td valign="top"><a href="onlinecv.php?section=Education">6. Application page<strong> 6</strong> (optional)</a></td>
      <td valign="top"><a href="upload.php">9. Upload Application</a><a href="onlinecv.php?section=Work Experience"></a></td>
    </tr>
  </tbody>
</table>

 

thank you for all of the help everyone, JP

 

Link to comment
https://forums.phpfreaks.com/topic/140025-need-help-with-submit-button/
Share on other sites

<form method=post>

you need to specify the page you want to submit to

<form method="post" action="page.php">

otherwise it defaults to submitting to self, though in my experience it doesn't work very well unless you do specify action even when you are submitting to self.

To Post to self, a easy way is to say:

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

 

Everything works fine except when the submit (save) button is pressed after jobseeker enters info i would like to make it go to the next page in the application.

I would like to make Carrier Objective go to Job Preferences after submit and then from Job Preferences to Settings after submit, etc.

 

thanks again, JP

 

P.S. Sorry, i believe i posted this in the wrong place. i should have posted it in the php someone else wrote section.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.