PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if ($_REQUEST[url] != "") {
$result = 1;
if (! ereg("^https?://",$_REQUEST[url])) {
$status = "This demo requires a fully qualified http:// URL";
} else {
if (@fopen($_REQUEST[url],"r")) {
$status = "This URL is readable";
} else {
$status = "This URL is not readable";
}
}
} else {
$result = 0;
$status = "no URL entered (yet)";
}
?>
<html><head><title>Does a URL exist?</title></head>
<body bgcolor="white"><table width="600"><tr><td>
<?php
if ($result != 0) {
print "Checking URL <b>".htmlspecialchars($_REQUEST[url])."</b><br />";
}
print "$status";
?>
<br />
<hr />
Please enter a URL you would like to validate (existance check):
<form>The URL: <input name="url" size=50/>
and <input type="submit" /></form>
<hr />
Copyright <a href="http://www.wellho.net/">Well House Consultants</a>
<?= date("Y") ?><br /><br />
<b>Source code of this example:</b><br /><br />
<?= highlight_file($_SERVER[SCRIPT_FILENAME],1) ?>
</td></tr></table>
</body></html>
When an user clicks on submit and if the url is valid , I would like to disappear the previous form and appear a button "NEXT" which onclick going to an other page.
Pleaseeeeeeeeee help me. It's important !
Thank you !