Janet N
2008-01-30 05:51:39 UTC
Hi there,
I have two forms on the same php page. Both forms has php embeded inside
html with it's own submit button.
How do I keep the second form from not disappearing when I click submit on
the first form? My issue is that when I click the submit button from the
first
form (register), the second form (signkey) disappear. Code below, any
feedback is appreciated:
<form name="register" method="post" action="/DKIMKey.php">
<input type="submit" name="register" value="Submit Key">
<?php
if (isset($_POST['register']))
{
$register = $_POST['register'];
}
if (isset($register))
{
$filename = '/usr/local/register.sh';
if(file_exists($filename))
{
$command = "/usr/local/register.sh ";
$shell_lic = shell_exec($command);
echo "<font size=2 color=blue>$shell_lic</font>";
}
}
?>
</form>
<form name="signkey" action="/DKIMKey.php" method="post"> <label
domain="label">Enter the domain name: </label>
<input name="domain" type="text"> <input type="submit" name="makesignkey"
value="Submit"
<?php
if (isset($_POST['makesignkey']))
{
$makesignkey = $_POST['makesignkey'];
}
if (isset($makesignkey))
{
if(isset($_POST['domain']))
{
$filename = '/usr/local//keys/generatekeys';
if(file_exists($filename))
{
$domain = $_POST['domain'];
$command = "/usr/local/keys/generatekeys " . $domain;
$shell_createDK = shell_exec($command);
print("<p><font size=2
color=blue>$shell_createDK</font></p>");
}
}
?>
</form>
I have two forms on the same php page. Both forms has php embeded inside
html with it's own submit button.
How do I keep the second form from not disappearing when I click submit on
the first form? My issue is that when I click the submit button from the
first
form (register), the second form (signkey) disappear. Code below, any
feedback is appreciated:
<form name="register" method="post" action="/DKIMKey.php">
<input type="submit" name="register" value="Submit Key">
<?php
if (isset($_POST['register']))
{
$register = $_POST['register'];
}
if (isset($register))
{
$filename = '/usr/local/register.sh';
if(file_exists($filename))
{
$command = "/usr/local/register.sh ";
$shell_lic = shell_exec($command);
echo "<font size=2 color=blue>$shell_lic</font>";
}
}
?>
</form>
<form name="signkey" action="/DKIMKey.php" method="post"> <label
domain="label">Enter the domain name: </label>
<input name="domain" type="text"> <input type="submit" name="makesignkey"
value="Submit"
<?php
if (isset($_POST['makesignkey']))
{
$makesignkey = $_POST['makesignkey'];
}
if (isset($makesignkey))
{
if(isset($_POST['domain']))
{
$filename = '/usr/local//keys/generatekeys';
if(file_exists($filename))
{
$domain = $_POST['domain'];
$command = "/usr/local/keys/generatekeys " . $domain;
$shell_createDK = shell_exec($command);
print("<p><font size=2
color=blue>$shell_createDK</font></p>");
}
}
?>
</form>