Ask coding questions

← Back to all posts
How do you make an id for index.html
Korbindev (134)

Ok so what i mean is This, I want index to be
How do I get that?

ch1ck3n (2035)

you can use PHP for

echo "id = " . $_GET["id"];

or use javascript

var url_string = ""; //window.location.href
var url = new URL(url_string);
var id = url.searchParams.get("id");
Korbindev (134)

@ch1ck3n ok but like can i use that? for index.html like attach it so when i click on my website it will go to that?

ch1ck3n (2035)

@KorbinVanette I don't understand what you're saying

Korbindev (134)

@ch1ck3n like i put it in then the link is invalid