Can anyone tell me what's wrong with it?
my code doesn't work, before I even press any button it activates the value of button 3. check it.
------------------------------------
<html>
<head>
<title>VOG - test</title>
<style>
.buttonchenger {background-color:red;color:white}
a {text-decoration:none;color:blue}
a:hover {color:red}
body {font-family:Tahoma;color:red;font-size:9}
</style
</head>
<body >
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0" width="100%">
<tr><td><input class="buttonchenger" type="button" value="Checkup Winners" name="check"/></td></tr>
<tr><td><input class="buttonchenger" type="button" value="Create DB print" name="create"/></td></tr>
<tr><td><input class="buttonchenger" type="button" value="Update DB" name="update"/></td></tr>
</table>
<?php
if(isset($_POST['check']))
{echo "test1";}
else
{ if(isset($_POST['create']))
{echo "test2";}
else
{checkValuesIntoDB1();}
}
function checkValuesIntoDB1()
{
echo " this is another test";
}
?>
</form>
</body>
</html>
---------------------------------
that was the full code.
how can I get values from pressing the buttons?
my code doesn't work, before I even press any button it activates the value of button 3. check it.
------------------------------------
<html>
<head>
<title>VOG - test</title>
<style>
.buttonchenger {background-color:red;color:white}
a {text-decoration:none;color:blue}
a:hover {color:red}
body {font-family:Tahoma;color:red;font-size:9}
</style
</head>
<body >
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0" width="100%">
<tr><td><input class="buttonchenger" type="button" value="Checkup Winners" name="check"/></td></tr>
<tr><td><input class="buttonchenger" type="button" value="Create DB print" name="create"/></td></tr>
<tr><td><input class="buttonchenger" type="button" value="Update DB" name="update"/></td></tr>
</table>
<?php
if(isset($_POST['check']))
{echo "test1";}
else
{ if(isset($_POST['create']))
{echo "test2";}
else
{checkValuesIntoDB1();}
}
function checkValuesIntoDB1()
{
echo " this is another test";
}
?>
</form>
</body>
</html>
---------------------------------
that was the full code.
how can I get values from pressing the buttons?