php - Passing parameter in header tag -
i trying pass value header.
is there way pass parameter directed new web page.
below header code (it not work), pass parameter of "mycode" page.
header("location: http://evon1991-z.comp.nus.edu.sg/kxclusive/insertdetail.php".'$mycode');
how should go doing it?
variables don't expand inside single quotes. result of string concatenation like:
http://evon1991-z.comp.nus.edu.sg/kxclusive/insertdetail.php$mycode
you need:
header("location: http://evon1991-z.comp.nus.edu.sg/kxclusive/insertdetail.php?param=$mycode");
..assuming $mycode
plain value. in case $mycode
complete percent-encodeded query string format, prepend ?
, append main url.
Comments
Post a Comment