acctman Posted August 29, 2007 Share Posted August 29, 2007 everytime i try to upload it fails, i've been trying to find an example of how to update but all the example either don't use PHP or just show a generic text changing without really saving anything. webpage: <? $mp3user = mysql_query("SELECT `mp3_id`,`mp3_userid`,`mp3_title` FROM `rate_mp3s` WHERE `mp3_userid` = '".$en['m_id']."'"); echo "<ul style=\"margin-left: 210px;\">\n"; $counter = 1; while($en = mysql_fetch_array($mp3user)) { echo "<li>MP3 " .$counter. " : <span id=\"mp3title-".$counter."\">".$en['mp3_title']. "</span> | <a href=\"/modules/rating/process_mp3.php?user=" .$en['mp3_userid']. "&mp3=" .$en['mp3_id']. "\">Delete</a></li>\n"; $counter++; } echo "</ul>\n"; ?> <script type="text/javascript"> new Ajax.InPlaceEditor('mp3title-1', '/modules/rating/process_mp3.php'); new Ajax.InPlaceEditor('mp3title-2', '/modules/rating/process_mp3.php?user=<%m_id%>&id=<%mp3_id%>'); new Ajax.InPlaceEditor('mp3title-3', '/modules/rating/process_mp3.php?user=<%m_id%>&id=<%mp3_id%>'); </script> process_mp3.php <?php session_start(); $value = $_POST['value']; //$id = (int)$_GET['mp3']; $mp3_update = mysql_query("UPDATE `rate_mp3s` SET mp3_title='$value' WHERE mp3_id='".$_GET['mp3']."'"); echo $value; ?> Link to comment https://forums.phpfreaks.com/topic/67242-ajaxinplaceeditor-php-code-need-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.