Jump to content

submit button modification


joergermeister

Recommended Posts

I am trying to get my submit buttons on my jobsite to go to next page in application and not just refresh. The html code below is to the first submit button (submit button at bottom of code). I added the a href= line to create a link to the page i want it to go automaticaly after pressing each submit button for each section. All submit buttons and the application sections are on this html page and make a call for each section in onlinecv.php.

 

example: i would like the page http://www.expediterjobsonline.com/jobseekers/onlinecv.php?section=Career%20Objective to go to page http://www.expediterjobsonline.com/jobseekers/onlinecv.php?section=Job%20Preferences after the submit button is clicked.

 

submit button at bottom of code

<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>

 

here is the section it makes a call for i believe

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));
}

Link to comment
Share on other sites

I am not sure that there was a question in there but all you have to do is this:

 

<form method="post" action="http://www.expediterjobsonline.com/jobseekers/onlinecv.php?section=Job%20Preferences ">
<input type="submit" value="submit">

 

When you click the submit button it will go to the job preferences page.

Link to comment
Share on other sites

I believe that would make every section of the application go to that page when submit is clicked. the page only contains one form method=post and it is use for all sections that have a submit button. All submit button are coded on one html page but it will only show the section people are in when they are using the website (not a problem).

there are 10 sections and i want 2 or 3 of them to go to another page after submit button is clicked. 

i am only posting the parts that i think is the code from the html and php pages of the site because admin said the post had to much code to go through for anyone to help me.

 

thanks again, JP

Link to comment
Share on other sites

I am not sure if this is right or not but if you wanted to have one submit button for different sections. you could make a unique value telling it which page to go to and have it submit to the same page like this:

 

<form method="post" action="submit.php ">
<input type="text" name ="unique">
<input type="submit" value="submit">
</form>

 

Then on the submit.php page you could have it check for that value and redirect to the right page like this:

 

<?php
$unique = $_POST['unique'];

if($unique == "value")
{
header("location:job_preferences.php")
}
elseif($unique == "value2")
{
header("location:another_page.php")
}
?>

 

I think that is what you are looking for?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.