View Full Version : Need simple variable transfer
dannygoh
09-14-2004, 08:00 AM
I like to create a simple php form that capture
domain name
username
password
on successful, i will redirect to DA login page with their own domainname.com:2222 and prefill their username and password
thanks in advanced.
toothbrush
10-21-2004, 02:56 PM
You could put the following into a single file:
<?php
if ($_POST['username']) {
?>
<html>
<body onLoad="javascript:document.forms[0].submit()">
<form action="http://www.<? echo $_POST['domain'] ?>:2222/CMD_LOGIN" name="form" method="post">
<input type="hidden" name="username" value="<? echo $_POST['username'] ?>">
<input type="hidden" value="<? echo $_POST['password'] ?>" name="password">
<input type="submit">
</form>
</body>
</html>
<?
//form has been submitted.
} else {
//no submission detected, show login page.
?>
<form name="form1" method="post" action="<? echo $_SERVER['PHP_SELF'] ?>">
<p>user:
<input type="text" name="username">
<br>
pass:
<input type="password" name="password">
<br>
domain: http://www.
<input type="text" name="domain">
:2222</p>
<input type="submit">
</form>
<? } ?>
HTH :)
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.