Jump to content

[SOLVED] form


h3ktlk

Recommended Posts

Trying to use php to show or hide a form... maybe im going about this wrong..

 

this is what i have.

 

<?php if ($row_group['group'] == "admin") { 
                      echo "<form id=\"form2\" name=\"form2\" method=\"post\" action=\"\">";
                      echo "<span class=\"style9\">";
                      echo "<label> </label>";
                      echo "</span>";
                      echo "<label>";
                      echo "<div align=\"center\" class=\"style9\">";
                      echo "<input type=\"text\" name=\"delete\" id=\"delete\" />";
                      echo "<br />";
                      echo "<input type=\"submit\" name=\"submit\" id=\"deletebut\" value=\"Delete\" />";
                      echo "</div>";
                      echo "</label>";
                      echo "<div align=\"center\"></div>";
                      echo "<div align=\"center\"></div>";
                      echo "</form></td>";
                      echo "</tr>";
                      echo "<tr>";
                      echo "<td bgcolor=\"#CCCCCC\"> </td>";
                      echo "<td bgcolor=\"#CCCCCC\"><div align=\"center\"><font color=\"#FF0000\">";
                     } ?>
                   
			<?php

			if (isset($_POST['submit']))
			{
			f();
			}

			function f()
			{
			echo "Record Deleted";
			}
                ?>

 

it shows the form no matter what group is .  Please help

 

 

Link to comment
https://forums.phpfreaks.com/topic/123938-solved-form/
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.