Page 1 of 1

Dinamic load and php

Posted: Tue May 08, 2007 8:47 am
by fredi_bieging
hi,

I have a page with basically three divs.. a header, a sidebar and one for the content. so, a load my php scripts into the content div clicking on the sidebar options... ok, when submit a form in these scripts I would like to return to the same script i was before.. but.. If I use something like:

Code: Select all

header("Location: myscript.php");
this redirects to that script, and I loose my "css framed" structure. is there a way of redirecting just for that div?

Posted: Tue May 08, 2007 9:07 am
by CoderGoblin
To change only one "part" of a page you need javascript. AJAX is a common method of doing this. The only other way of doing this is to work out some way of passing parameters as if part of a form ($_GET or $_POST) via a form submit or appending the

Code: Select all

header("Location: myscript.php");
with a $_GET string.

Code: Select all

header("Location: myscript.php?sub=2");
Hope that's understandable.