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
I have an ATL control that I want to be Unicode-aware. I added a
I have a generic method with this (dummy) code (yes I'm aware IList has
I have created a basic WCF service in IIS. I am aware that this
I have a PHP project (I'm using CodeIgniter) with data capture. The form is
I have read this but still not fully aware of the advantage of slice
I want this : I am building a few screens where I will have
I have worked on iPhone application but not aware of the formalities to submit
I am aware of CocoaMySQL but I have not seen a Mac GUI for
I'm aware of the Substance look and feels and that they have a Office

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.