how do i get certain values to "print"???? !!!!!500 points!!!

Posted on 2003-11-23
Last Modified: 2008-03-06
I am having much trouble with a PHP page a friend made for me.  Its an order form and some values do not print out onto the next page.  please take a look at the page   It doesnt print the final price and the name, address phone number ETC...  after you hit the finalize button, much help is needed!!! please!  thank you very much!
Question by:lennyhepner
LVL 13

Expert Comment

ID: 9806282
we need the source code (the original schoolorderform.php) to be able to do anything really


Accepted Solution

zariok earned 500 total points
ID: 9807593
On your 'post' page, make sure you're referencing the variables via the $_POST[''] superglobal.


print("Name: ".$_POST['name']."<br />");

What your problem looks like is that you're not putting the subtotal, shipping and final total as "hidden" variables in the form that posts to the final page.  Be sure you do this within the <form> tags.

<input id="subtotal" name="subtotal" type="hidden" value="<?=$subtotal;?>" />


<input id="subtotal" name="subtotal" type="hidden" value="<?php echo $subtotal; ?>" />


Author Comment

ID: 9829357
sorry for the delay, i have the source code at
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Expert Comment

ID: 9833206
It´s pretty hard for ya to just trow a problem with this complexity and just expect any answer (that is not the source code page, you have to create a phps page or put a <pre> I think between the start and the end of your code </pre>).... but I will help you with the logic that is the first step...

You have to post to the same page and do a error check....

then once you have that working do a...

//or if(!$_POST['navy']){     whatever works best...
if ($_POST['navy']){          
$navyvalue = '10';
$totalvalue = '10';
LVL 13

Expert Comment

ID: 9834254
that is the source code, you just have to do view source.. copy this to IE: view-source:

LVL 14

Expert Comment

ID: 10361224
This form seems to be working now. Do you still need help?

Expert Comment

ID: 12571930
My solution provided the proper method on how to print out any $_POST vars after the form submission.


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question