guys i want my php pages appear as eg : my-page.com/page.php?id=01 please tell me how to do it and do i need to create many pages each one with different id or how does it work .

Recommended Answers

All 2 Replies

Member Avatar for rajarajan2017

If your form method is get then your element name and values are submitted through the URL of your action file.

<form method="get" action=page.php">
...
</form>

You receive the id by using the following statement in page.php:

id=$_GET['id'];
echo id;

either with switch and cases
$id = $_GET;
switch($id) {
case 1:
print "it's 1st pg";
break;
case 2:
print "it's 2nd pg";
break;
case "etc":
print "wtever";
break;
}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.