On Feb 19, 1:40 pm, "2291980" <stephenhb...@gmail.comwrote:
Hello
can any body tell me the dff between
function redirect($url)
{
echo "<script>";
echo "window.location='".$url."'";
echo "</script>";
}
and
header("Location $url")
syntex belong to php
Dear Stephen,
In the first solution PHP creates a JavaScript and sends it via a
'normal' HTML page to the browser. If the browser has JavaScript
enabled it loads the new URL. If it is disabled, nothing happens.
In the second solution PHP sends a redirect statement with the URL to
the browser. The browser loads the new URL.
Cheers
Martin
------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at