When I created an account on this site I got this url:
http://www.thescripts.com/forum/regi...hp?do=register
So now I have a question about ?do=register and what does this mean ?
Suppose you have a web page named main.php with some links to different pages with same layout (one table) but different contents depending on what the visitor clicks.
For example:
Link 1 leads you to page with content Hello link 1
Link 2 ==> Hello link 2
...
Do you have to create 2 pages for this script?
Let us take a look at the source code of this site:
Expand|Select|Wrap|Line Numbers
- <form action="http://www.thescripts.com/forum/register.php" > .. </form>
index.php
[PHP]<html><head><title>..</title></head>
<body>
<form action ="process.php" method="post">
What is democracy? <br />
<input type="text" id="answer" /><br />
<input type="submi" id="Control the answer" />
</form>
<?php
$result = flase;
if ($result) {
echo("Good answer");
else
echo("Try again!");
}
?>
</body>
</html>
[/PHP]
process.php
[PHP]<?php
$answer = $_POST['answer'];
$result = flase;
if ($answer = 'democracy means protecting the capitalists')
$result = true;
else
$result = flase;
Redirect header("Location: index.php");
?> [/PHP]
So how do you link the $result variable with the index.php page or how do you pass this to other pages ?
Let's make the knowledge/experience open source and share it with each other ;)