Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6679637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:22:55+00:00 2026-05-26T04:22:55+00:00

I am aware I have no vailidation or sanitziation. This will be added :D

  • 0

I am aware I have no vailidation or sanitziation. This will be added 😀

I currently have a php form which requests the following information:

  • Avg. salary
  • number of employees
  • Pension Uptake PCT
  • Pension Contributuin PCT

Which is then submitted, and proccessed by a file called SSESC.php (code will be below).

It should then return, the computed data to the field Total Employee contribution ($TEC) and Total Savings ($NISAVING)

I can get the data passed to the SSEC.php file, and it is processed (tested by echo) but I am unable to get the data back and displayed on the form.

Im attempting to save the data into a session, and then return and refill the form. Im returning from the script by using <?php header ("location: form.php");?>. this works but the form is not filled in. I will include the snippets below from the form.

SSESC.php code

<?php header ("location: form.php");?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org    TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SSEC-Process</title>
</head>
<?php
setlocale(LC_MONETARY, 'en_GB');
$Average_Salary = $_POST["Average_Salary"];
$EMPNUM = $_POST["EMPNUM"];
$PUPCT = $_POST["PUPCT"];
$PCPCT = $_POST["PCPCT"];
$TEC = "";
$NI_save = "";

$employeepension = $PCPCT/100;
$pensionuptake = $PUPCT/100;

$TEC = $Average_Salary*$employeepension*$EMPNUM*$pensionuptake;
$combi = $TEC*13.8/100;

$NI_save =  money_format('%.0i', $combi);

$_SESSION["TEC"] = money_format('%.0i',$TEC);
$_SESSION["NISAVE"] = $NI_save;

?>

<body>
</body>
</html>

Form Snippets

<input id="TEC" name="TEC" class="Label" type="text" maxlength="255" value="<?=  $_SESSION['TEC']?>"/> 


<input id="NI_save" name="NI_save" class="label" type="text" maxlength="255" value="<?=$_SESSION['NISAVE']?>"/>

Thanks in advance.
Steve.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:22:56+00:00Added an answer on May 26, 2026 at 4:22 am
    1. You are not starting the session handler. You should have
      session_start(); on top of both of your scripts. (Both in this script and in form.php. Right at the top)
    2. Why are you outputting HTML if you are not showing any, and redirecting to another file anyways?
    3. Remove the unnecessary HTML on the processing script, and move the header() call to the bottom of the processing script.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed a simple location aware iPhone application which is functionally working very
Disclaimer I am well aware that PHP might not have been the best choice
I have a PHP project (I'm using CodeIgniter) with data capture. The form is
I'm aware that similar questions have been answered here before: postscript - overlay one
I have worked with Apache before, so I am aware that the default public
I have a question regarding how to get a div height. I'm aware of
I am aware of Web Services and WCF but I have generic question with
I'm aware of server-side javascript for a long time now, but I don't have
Is anyone aware of of anybody offering hosted perforce servers? It doesn't have to
Is it possible to have a bi-directional web part connection? I am aware that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.