Well, it’s a bit hard to guess. What makes you think anything is wrong with it? Do you get error messages, if so, what do they say? Give us a bit of a clue.
Two things that might be wrong with it:
I can’t see why this line starts with two dollar signs:
$$field = strip_tags(trim($value));
You’re using mysql calls to access the database, you should read up on changing them to mysqli or PDO instead as mysql is deprecated and will disappear soon.
[ot]That’s the correct term. Though at first it doesn’t make much sense. I mean, is there such a thing as a non-variable variable?
Or a CONSTANT CONSTANT?[/ot]
Actually include_once (and its kind) are not functions but language constructs so the parantheses are not needed.
They work with them (in most uses), and there is a lot of example code with them, so it’s easy to think they need them.
“mysql_connect():php_network_getadresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\subject.php on line 51”, and “Couldn’t connect to server.” And which books do you recommenmd for a starter like me as the books I read are old schs
Oh, OK. I forgot to add my usual “but I’m still learning this stuff” disclaimer. Turns out it’s probably not relevant to the problem now we know what error the OP is getting.
I’d have a good read of some of the articles on here rather than necessarily looking for books - I’ve got quite a few books, either real or e-book, and a lot of them are still using old methods just because of how long it takes for these things to be reprinted.