PHP question
PHP question
Out of context: Reply #2
- Started
- Last post
- 7 Responses
- unfittoprint0
tip: instead of
$id=$_POST['id'] ; $title=$_POST['t itle']; $news=$_POST['news']
use
foreach ($_REQUEST as $key => $value) {
$$key = $value;
}and you'll get all your post/get/cookie data [no sessions tough].
also:
I learned that what worked in mylocalhost wouldn't work on the server, so you could try to addslashes() to your string variables before doing the update query.