Jump to content

How To add striplashes for reviews in this code


kununited2007

Recommended Posts

<?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>" . $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.