h3ktlk Posted September 12, 2008 Share Posted September 12, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/123938-solved-form/ Share on other sites More sharing options...
The WebCoder Posted September 12, 2008 Share Posted September 12, 2008 Can you please post the whole script? We can't help you without the whole script... Quote Link to comment https://forums.phpfreaks.com/topic/123938-solved-form/#findComment-639824 Share on other sites More sharing options...
h3ktlk Posted September 15, 2008 Author Share Posted September 15, 2008 you know what ty for the help but i just needed to step away and found my mistake.. it was a simple typo in my string for the recordset i named that didnt conform to the script. Quote Link to comment https://forums.phpfreaks.com/topic/123938-solved-form/#findComment-641929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.