mananx Posted January 21, 2009 Share Posted January 21, 2009 Very strange problem . I have the same site hosted on two servers 1) go daddy 2) my local server apache / mysql /php 5 This code is working good on godaddy server , but on my server , sql update query is not executed . Database connection is being made because it shows the data from database . if(isset($_POST['save'])) { $page_name=$_REQUEST['show']; $description=htmlentities( $_POST['elm1']); $sql="UPDATE pages SET description = '".$description."' WHERE page_name = '".$page_name."'"; $db->ExecuteQuery($sql); header("location:index.php?show=".$page_name); exit(); } <form method="post" action="index.php?show=<?=$show?>"> <textarea id="elm1" name="elm1" rows="35" cols="80" style="width: 80%"> <?=$desc?> </textarea> <br /> <input type="submit" name="save" value="submit" /> <input type="reset" name="reset" value="Reset" /> </form> Link to comment https://forums.phpfreaks.com/topic/141801-strange-_post-problem/ Share on other sites More sharing options...
Maq Posted January 21, 2009 Share Posted January 21, 2009 Where do you initiate your $db object? Link to comment https://forums.phpfreaks.com/topic/141801-strange-_post-problem/#findComment-742373 Share on other sites More sharing options...
sasa Posted January 21, 2009 Share Posted January 21, 2009 change <?=$show?> to <?=$page_name?> Link to comment https://forums.phpfreaks.com/topic/141801-strange-_post-problem/#findComment-742411 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.