ascikey - yes, I'm positive my submitter is correct. BTW, love your alias. Did you know the guy who wrote ASCII just died?
DRJ478 I do my session_start() at the beginning of every script. I don't know how I can apply the output buffering to my program. It sends the email just fine. My case...
I start a session at the beginning of each script.
This is how it works:
It goes to a page (customerpaypal.php) that displays their shopping cart and a form for them to fill out. They have the choices of clicking on a Continue Checkout button or a Shop Some More button.
It goes to switch.php...
Well, I output something before I go to the switch.php. But once it's there, all it does is go through that case statement. I've taken out all displays. The only other thing the switch script does is start a session.
It does get to it because the other option would show error messages and it does. Here is the code I used:
case ("Continue Checkout") && ($EmailDone == 1):
header("Location: GoToPayPal.php");
exit;
I also put in an echo there with a msg and it does display that. So it's getting to that...
kenrbnsn, what do you use instead of include? What I wouldn't give for a goto or a BAS. LOL
I lost the {} and am no longer using an if and it still appends the button to the previous script.
DRJ478, the redirect didnt do anything.
Yes, I remember what an include does from C. But that's the only way I know to use more then one submit button to go to different scripts. In my form action, I have it going to the switch script and based on the value of the submit button, I send it to the appropriate script. This works...
I am using an include to go to different PHP scripts. All of them open into a new page except for one. I can't for the life of me figure out why this one insists on appending the script to the previous script. Here is my code for the switch script:
switch($submitter)
{
case "Shop Some...
I realize that PHP uses an interpreter rather then a compiler so that it makes just one pass. But does it process the HTML before the PHP code? It doesn't seem to do just a top down kind of processing by processing all the code in the order it was written.
I'm so embarrassed. I fixed it myself. It was a misplaced bracket. I'm so sorry I bothered you with something so stupid. You know how you can look at code for hours and only when you seek outside help, you find the problem.
Thanks for your help.
judi with egg on my face
They do exist. I'm displaying echo
$_SESSION["CheckCust"]
$_SESSION["$error_flag"]
They have no value, obviously, the first time. When you hit submit in the customer form, those vars have a value but the session vars in the switch program dont until you hit submit yet again.
I've tried this several ways with the same result. One of the ways I tried doing this was by using a switch program that works fine with my other forms. But in customer if I have the action go to the switch program when the user hits the delay button, something very strange happens.
I do use a...
To Toby, yes, the if statement is in customer.php.
DRJ478: I am including the error checking code in the customer.php. It's really calling itself.
But then, if there are no errors, it should go to checkout.php and it doesn't til I hit submit the second time.
I tried using Include checkout.php...
I want to be able to take a different action with one submit button depending on circumstances. So I'm trying to use the following statement.
If ($ErrFlag) {
echo "<BR>this should be customer";
echo "<form NAME=\"errform\" ACTION=\"customer.php\">";
}
else {
echo "<BR>this should be...
Thanks for this. But how does it get un-encrypted on my client's side? That's where I'm having the trouble. She doesn't have PHP on her computer. Will I have to write a little compiled program?
My ecommerce site is in PHP and it's working fine. I'm going to use a Quick SSL and I understand it all. But I still have one problem.
My client wants the credit card# and all the info emailed to them and they will do the transaction from their office. I can't figure out how to email the info...
I've done that. If I do that before the submit button, the value isn't there yet. If I do it after the submit button, it doesn't see it since it's gone to a new script.
I'm already using include. No matter what submit button is clicked, it goes to a switch.php. There depending on the button, it...
that's obviously my problem. I've tried putting a session variable in the input statement, but it gives me an error. So where do I move the $deleteitem[$i] to a session variable? It seems that when the user clicks the submit button, it goes right to the other script, thus destroying my $_POST...
this is what I get with that:
Array ( [] => )
I am going to an intermediate script after the user clicks on the delete button. I have to do this because I have multiple submit buttons. But that shouldn't make a difference since the $_POST is supposed to exist for the duration of the session.
The array $deleteitem is just a list of checkboxes associated with model, category, etc. If the user checks one, it should delete the whole item. The input statement is in a For loop and it creates the checkbox dynamically depending on how many items the user has selected.
When I've tried to...
I'm still confused. I'm sorry. Let me try again:
I have a for loop which is displaying a list of items chosen. Here is the checkbox for the input:
for ($i = 1; $i <= $NumItems ; $i++ and $empty == 0) {
echo "<TR>";
// there are other items in this list
printf...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.