PHP <a href= click value to cookie -


for site use 1 big php file wich generate pages, use url transfer menu choice , that's want change.

<li><a href="index.php?s=i">home<br></a></li> <li><a href="index.php?s=z">about<br></a></li> 

i want loose ?s=z url , pass value 'z' cookie when clicked , reload php file, read cookie, , generate page "about".

i thinking , playing "onclick", didn't work.

regards,

marco

with on question solved problem, it's work around, trick.

basicly solution if there var @ end of url.

if so, put var in cookie , reload page without url var. after reload, read cookie , execute menu option.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -