Solved

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

Posted on 2003-11-23
10
296 Views
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 http://www.johnhestertextiles.com/schoolroom/schoolorderform.php   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!
0
Comment
Question by:lennyhepner
10 Comments
 
LVL 13

Expert Comment

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

loz
0
 
LVL 1

Accepted Solution

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

Example:

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;?>" />

(or)

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

-zariok-
0
 

Author Comment

by:lennyhepner
ID: 9829357
sorry for the delay, i have the source code at http://www.johnhestertextiles.com/schoolroom/schoolorderform.txt
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 2

Expert Comment

by:ramonklown
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';
}
0
 
LVL 13

Expert Comment

by:lozloz
ID: 9834254
that is the source code, you just have to do view source.. copy this to IE: view-source:http://www.johnhestertextiles.com/schoolroom/schoolorderform.txt

loz
0
 
LVL 14

Expert Comment

by:cracky
ID: 10361224
This form seems to be working now. Do you still need help?
0
 
LVL 1

Expert Comment

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

0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

810 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