djjjozsi;10920552 wrote:
if you save (fwrite) this string into a file then you can get a working php code which exepts an incoming variable from an URL.
I'm certain that was meant to be "can't get" instead of "can get".
First off, file access is not thread safe over one page request (assuming multiple users)
Imagine two users, A and B.
A sends a GET request
B sends a GET request
A reads 2 FROM $GET['pageID']
A writes 2 to file
B reads 1 FROM $GET['pageID']
B writes 1 to file
Server shows A the page corresponding to pageID 1
Server shows B the page corresponding to pageID 1
Now, over to the error message:
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in list_html.php on line 58
Line 58. Yet, your posted code shows only 19 lines of code.
Other than that, as previously suggested, you will have to check if $_GET['whatever'] actually is set:
if (isset(...))
or (isset(...) ? ... : null)
Finally, in your anchor tag's href attribute, you need to use "&" instead of "&". Do use a validator, such as http://validator.w3.org/