You are here: Re: Submit form with variable for action? « PHP Programming Language « IT news, forums, messages
Re: Submit form with variable for action?

Posted by Joseph S. on 09/27/05 23:39

This works on my computer, should work on yours as well:
just type yahoo.com in the third field:
<html>
<head>
<title>Variable action field</title>
</head>
<body>
<form action="varaction.php" method="post" name="login" id="login">
Username:<input name="usrname" type="text"/>
Password:<input name="pass" type="password"/>
Domain: http://www.<input name="domain" type="text"/>
<input name="submit" type="submit" value="Login"/>
</form>
<?php
if (isset($_POST['submit'])){
header("Location: http://www.{$_POST['domain']}");
}
?>
</body>
</html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация