Jump to content

help me on this code as i am not geting to redirect checkbox-form.php


kununited2007

Recommended Posts

<form action="checkbox-form.php" method="post">
<input type="checkbox" name="c1" value="1" /> Pending
<input type="checkbox" name="c1" value="2" /> Approved
<input type="checkbox" name="c1" value="3" /> Rejected
<input type="button" name="formSubmit" value="Fetch Results"/>
</form> 
<?php
$con = mysql_connect("localhost","root","password");
if (!$con)
  {
  die('Could not connect:' . mysql_error());
  }
  mysql_select_db("Products", $con);
$result = mysql_query("SELECT * FROM btp_reviews" );
echo "<table border='1' cellspacing='0' cellpadding='0'>";
echo '<tr>
<td>Id</td>
<td>Review</td>
<td>Name</td>
<td>Update</td>
<td>Status</td>
</tr>';
while($row = mysql_fetch_assoc($result))
  {
  echo '<tr>';
  echo '<td>' . $row['id'] . '</td>';
  echo "<td>" . strip_tags($row['review']) . "</td>";
  echo "<td>" . $row['r_name'] . "</td>";
  echo "<td>" ."<form action='radio.php' method='post' ><a href=http://localhost/editt.php?id=".$row['id'].">Edit</a>.</td>
                <td>" ."<input type='radio' name='r1' value='2' />Approve<br/><input type=hidden name=id value='".$row['id']."' />
                         <input type='radio' name='r1' value='3' /> Reject<br/>
                             <input type=submit value=Submit /></form>"."</td>";
                            
  }
echo "</table>";
mysql_close($con);
?> 

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.