Having problems storing 's from my php form to the database.
here is the line that stores the review text. ContentText = ‘$_POST[review_text]’,
I tried this I ment I tried like this ContentText = ‘".mysql_real_escape_string ($_POST[review_text])."’
but I don’t see any text stored in the text box.
What am I doing wrong?
[php]<?
require_once("…/conn.php");
require_once("…/includes.php");
require_once(“access.php”);
require_once(“AdminNavigation.php”);
if(isset($_POST[s1]))
{
$q1 = "update games_content set
ItemID = ‘$_POST[item_id_1]’,
ContentTitle = ‘$_POST[review_title]’,
ContentText = ‘$_POST[review_text]’,
rating = ‘$_POST[rating]’
where ContentID = '$_GET[ContentID]' ";
mysql_query($q1);
if(!mysql_error())
{
$message1 = “
This review has been updated!”;
$message2 = “<a href=“list_content.php?cmd=review&ItemID=$_GET[ItemID]” class=BlackLink>Back to reviews”;
}
}
//get the review info
$q1 = "select * from games_content where ContentID = ‘$_GET[ContentID]’ ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
?>
Game: | <?=select_item($a1[ItemID], "item_id_1");?> |
Review Title: | |
Add Gossip here: | <?=$a1[ContentText]?> |
Rate game: | <?=select_rating($a1[rating]);?> |
<?=$message2?> |