The problem is this my submit button did not send to this $_POST['submit'] in my php code whether it because of the false in my button which i just add(<input type="submit" name="submit" value="Submit" onClick="show_c ontent('div_2') ; return false;"/>)how can i fix this thanks
Code:
<html>
<head>
<title>home</title>
</head>
<link href="SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="active_content.js"></script>
<body>
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0">Tab1</li>
<li class="TabbedPanelsTab" tabindex="0">Tab2</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent" id="div_1">
//this is where the content of the tab1 will be and i have another form in this content too
</div>
<div class="TabbedPanelsContent" id="div_2">
//this is where the content of the tab2 will be
<form action="home.php" method="post">
<?php
if (isset($_POST['submit'])) {
if(empty($_POST['boded']){
echo"Please do it again.";
}else{
$mgs = ($_POST['boded']);
//then insert to my database
}
?>
<form action="home.php" method="post">
<textarea id="message" name="boded" rows="5" cols="40"></textarea>
<input type="submit" name="submit" value="Submit" onClick="show_content('div_2'); return false;"/>
</div>
</body>
</html>
Comment