baked Posted October 28, 2009 Share Posted October 28, 2009 I'm trying to edit the advertisement field in this database using Celerondude's upload script. However, it doesnt seem to work and I can't figure it out. Would anyone care to take a look? elseif ( $action == 'editadvert' ) { if ( $task == 'save' ) { $ad_id = gpc ( 'ad_id', 'P'); $mysqlDB->query ( sprintf ( "UPDATE uploader_users SET advert_id='$ad_id' WHERE userid=%d;", (int)$ad_id, $UPL['USER']['userid'] ) ); // back to preferences header ( 'Location: ' . $_SERVER['HTTP_REFERER'] ); } else { // show form $inf = array ( 'ad_id' => $UPL['USER']['advert_id'], ); $tpl_usercp->set ( 'user', $inf); $tpl_uploader->set ( 'content', $tpl_usercp, '$ad_id' ); } } All I'm getting for the output is "0".. thank you. Link to comment https://forums.phpfreaks.com/topic/179303-simply-edit-a-field-in-the-db/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.