/    Sign up×
Community /Pin to ProfileBookmark

How can I have on page saying this in an <A href

[code=html]<A href=”page.php&q=question&a=answer”>Click<A>[/code]

So that when I click on it, It has a window that says

Question
Answer

PLEASE HELP

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@JupacMar 26.2006 — <?php

$a = $_GET['a'];

$q = $_
GET['q'];

if($q && $a){

echo "$q";

echo "$a";

}

else{

echo "Nuting";

}

?>
Copy linkTweet thisAlerts:
@AltF4authorMar 26.2006 — Now how can I make a form do the same thing?
[code=html]
<form>
<input type="text" name="q"><br>
" " name="a">
<input type="submit"....
[/code]
Copy linkTweet thisAlerts:
@MauMar 26.2006 — [code=php]
if (isset($_POST['q']) && isset($_POST['a']))
{
echo $_POST['q'] . '<br />' . $_POST['a']);
}

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<label for="q">Question</label> <input type="text" name="q" id="q" /><br />
<label for="a">Answer</label> <input type="text" name="a" id="a" /><br />
</form>
[/code]


Untested.
×

Success!

Help @AltF4 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...