PHP POST not working

If you’re just refreshing the page, do: action=” instead of: action=”<?php echo $_SERVER[‘PHP_SELF’];?>” Also, add this to line 2 to see what’s being stored (if anything) in the $_POST array: var_dump( $_POST ); Hmm… so it’s empty on submit? Try adding this to the top of your php file: if(empty($_SERVER[‘CONTENT_TYPE’])) { $_SERVER[‘CONTENT_TYPE’] = “application/x-www-form-urlencoded”; } … Read more

How to use shell commands in Makefile

With: FILES = $(shell ls) indented underneath all like that, it’s a build command. So this expands $(shell ls), then tries to run the command FILES …. If FILES is supposed to be a make variable, these variables need to be assigned outside the recipe portion, e.g.: FILES = $(shell ls) all: echo $(FILES) Of … Read more

How are echo and print different in PHP? [duplicate]

From: http://web.archive.org/web/20090221144611/http://faqts.com/knowledge_base/view.phtml/aid/1/fid/40 Speed. There is a difference between the two, but speed-wise it should be irrelevant which one you use. echo is marginally faster since it doesn’t set a return value if you really want to get down to the nitty gritty. Expression. print() behaves like a function in that you can do: $ret = … Read more