Jump to content

Need help with script


ricerocket

Recommended Posts

I have part of a script but I don't know how to make it open an http request then if the request is successful reload the script with the second name in the first position so on...

 

Heres the script:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Add Cpanel Email Accounts</title>
</head>

<body>

<fieldset>

<legend>Add a Cpanel Email Account</legend>
<form name="names">

<fieldset>
<legend>Name 1</legend>
<input type="text" name="n1" class="form_text" />
</fieldset>

<fieldset>
<legend>Name 2</legend>
<input type="text" name="n2" class="form_text" />
</fieldset>

<fieldset>
<legend>Name 3</legend>
<input type="text" name="n3" class="form_text" />
</fieldset>

<fieldset>
<input type="submit" name="send" class="form_button" value="Create Email Account" />
</fieldset>

</form>
</fieldset>

<?php

/*==========take name 1 and open an http request to a server with name first in line then if the request is successful open new url which sets the second name to first in line so on ==========*/

?>


</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/97205-need-help-with-script/
Share on other sites

do you mean

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Add Cpanel Email Accounts</title>
</head>

<body>

<fieldset>

<legend>Add a Cpanel Email Account</legend>
<form name="names">

<fieldset>
<legend>Name 1</legend>
<input type="text" name="n1" class="form_text" value="<?php echo $_GET['n2']?>"/>
</fieldset>

<fieldset>
<legend>Name 2</legend>
<input type="text" name="n2" class="form_text" value="<?php echo $_GET['n3']?>"/>
</fieldset>

<fieldset>
<legend>Name 3</legend>
<input type="text" name="n3" class="form_text" value="<?php echo $_GET['n1']?>"/>
</fieldset>

<fieldset>
<input type="submit" name="send" class="form_button" value="Create Email Account" />
</fieldset>

</form>
</fieldset>

<?php

if (isset($_GET['send']))
{
    extract ($_GET);
    echo "<p>$n1 $n2 $n3</p>";
}
?>


</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/97205-need-help-with-script/#findComment-497406
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.