There's your problem right there. You're including index.php into the  
Ajax callback script, so you are getting all that HTML printed out  
before the later script can send its headers. Unless you use a page  
buffer, any raw HTML (anything outside of the <?php ?> delimiters)  
included within a PHP script is printed right to the Web server the  
moment the script is parsed.

Try this (because I can see why you did this). Move all the MAR setup  
stuff out of your index page and into another script that you can  
include into both the index and the create_clone pages. Then you won't  
have the duplication, but you'll also only be including the PHP part  
into the create_clone, not the PHP plus a whole lot of other random  
HTML.

Just move lines 19, 20, and 21 of index.php as reported in Pastie.  
Replace them with a single require_once() to the new file you create,  
maybe call it MARClasses.php or something like that?

Then replace the require_once on line 4 in your create_clone script  
with a require to the same MARClasses.php script.

Also circle back and be sure you aren't doing the same thing with  
update_order.php, that should only be including the php parts as well.

Walter

On Jul 3, 2009, at 1:04 PM, WLQ wrote:

>
> index.php
> http://www.pastie.org/533394
>
> create_clone.php
> http://www.pastie.org/533425
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to