I am new to PHP and I discovered a new trick, I want to create a script and if $pagea=1 then it will display the contents of page a and so on but I want to know how to make a button or anything that is kinda like link and when users will click it, the values will change.

And help will be appreciated.

Thanks
Nahiyan

You would need to understand javascript to accomplish this.

Can you give me the example of the javascript required for doing this?

I am new to PHP and I discovered a new trick, I want to create a script and if $pagea=1 then it will display the contents of page a and so on but I want to know how to make a button or anything that is kinda like link and when users will click it, the values will change.

And help will be appreciated.

Thanks
Nahiyan

You can add a button or a link and use a href

echo "<a href='page.php?page=a'>A</a>

On the landing page add this:

$display = $_GET['page'];
switch($display){
case "a":
do something;
break;
default:
do something else;
break;
}