Hi,
One solution, if I understand the question correctly, might be to use a form with :
- one input type=text field for the URL
- one submit button per validator ; all having the same name
Something like this :
<html>
<head>
<title>Test ^^</title>
</head>
<body id="body-front">
<form method="get" action="">
<input type="text" value="" name="url" />
<input type="submit" name="validator" value="HTML Validator" />
<input type="submit" name="validator" value="CSS Validator" />
</form>
</body>
</html>
The form posts (gets, actually, here ^^ ) on itself ; which means, at the beginning of the PHP script, you can check if it has been submitted.
If it has, you have to
- check if the URL is OK
- detect which button was clicked (through it's value attribute)
- redirect to the right URL
For instance, you could put this on top of the .php file containing the form I just posted :
<?php
if (isset($_GET['url'])) {
// TODO : check the URL
// if not... do what you have to (like re-display the form)
if ($_GET['validator'] == "HTML Validator") {
header('Location: http://validator.w3.org/check?verbose=1&uri=' . urlencode($_GET['url']));
die;
} else if ($_GET['validator'] == "CSS Validator") {
header('Location: http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=' . urlencode($_GET['url']));
die;
}
// Not one the buttons we know => re-display the form
}
?>
It does just what I said :
- has the form been submitted ?
- is the URL OK (that's your job to say ;-) )
- which button has been choosen ?
- redirect to te right URL
With that, your user submits the form, and it feels to him like he is directly sent to the website of the validator he choose.
Without any kind of JS, I don't see another way...
(Note : I tested this only on Firefox ; would be better to test with other browsers ^^ particularly with the "all submit buttons have the same name" thing)
Hope this helps... Sorry if I didn't understand the question...