I have a form with shopping cart items that when submitted, goes to phpcart-m.php

phpcart-m.php calculates the shopping cart items and sends to phpcart.php?action=view which displays all the items on a page called display.php

The URL when display.php loads is http://mydomain/phpcart.php?action=view

As display.php loads, I need it to perform a different action: instead of phpcart.php?action=view, I need it to perform phpcart.php?action=confirm

I'm thinking at the top of display.php, I need something like this:

<?php
perform (phpcart.php?action=confirm)
?>

I tried changing the header using header ("location:phpcart.php?action=confirm") but got this error "Warning: Cannot modify header information - headers already sent by...."

phpcart-m.php and phpcart.php are Zend-encrypted, so I don't have access to that code.

Is this possible?

Member Avatar for diafol

I'm confused.

phpcart.php?action=view

includes the file display.php ?

If this is correct, then I imagine that there's quite a bit of code and possibly html output before the include line. Again, if this is the case, you can't use a header redirect.

Without access to the code, I'd be guessing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.