Results 1 to 8 of 8
-
25th Mar 2012, 01:52 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.coUpdating the DB
Well here's my code:
PHP Code:$newName = $_POST['sName'];
$newUrl = $_POST['sURL'];
$newRate = $_POST['sRate'];
$newEmail = $_POST['sEmail'];
$reason = $_POST['sReason'];
mysql_query("update wcddl_sites set name='$newName',url='$newUrl',rate='$newRate',email='$newEmail' WHERE id='". mysql_real_escape_string($sid) ."'");
Any ideas?Chris2k Reviewed by Chris2k on . Updating the DB Well here's my code: $newName = $_POST; $newUrl = $_POST; $newRate = $_POST; $newEmail = $_POST; $reason = $_POST; mysql_query("update wcddl_sites set name='$newName',url='$newUrl',rate='$newRate',email='$newEmail' WHERE id='". mysql_real_escape_string($sid) ."'"); Rating: 5
-
25th Mar 2012, 01:57 PM #2Respected MemberWebsite's:
DL4Everything.com Soft2050.inReplace query code with:
PHP Code:mysql_query("update wcddl_sites set name='$newName',url='$newUrl',rate='$newRate',email='$newEmail' WHERE id='". mysql_real_escape_string($sid) ."'") or die ("Error: " . mysql_error());
-
25th Mar 2012, 02:06 PM #3OPBannedWebsite's:
WarezRelease.org ThatHosting.coadded, didn't give me an error..
-
25th Mar 2012, 02:48 PM #4Retired NinJaWebsite's:
loledhard.comadd this to ur file
error_reporting(E_ALL);
& u might see the error which is stoping it from working
You don't hate Justin bieber.You hate the fact you ain't Justin Bieber!
-
25th Mar 2012, 03:17 PM #5Respected Member
Where is the $sid coming from you are basing your update on??
-
25th Mar 2012, 03:36 PM #6OPBannedWebsite's:
WarezRelease.org ThatHosting.co$sid is from:
PHP Code:while($sInfo = mysql_fetch_assoc($get)) {
$sid = $sInfo['id'];
$sname = $sInfo['name'];
$srate = $sInfo['rate'];
$semail = $sInfo['email'];
form data here....................
}
-
25th Mar 2012, 04:35 PM #7MemberWebsite's:
LulzCovers.com LulzTroll.comPHP Code:mysql_query("update wcddl_sites set name='" . $newName . "',url='" . $newUrl . "',rate='" . $newRate . "',email='" . $newEmail . "' WHERE id='". mysql_real_escape_string($sid) ."'");
Contact me for Traffic, SEO, WCDDL, Wordpress, IPB related Services or queries.
Template Designing, PSD to HTML, Wordpress
-
25th Mar 2012, 09:09 PM #8Respected Member
So you can see the query and try it in phpmyadmin change your code to this:
PHP Code:$newName = $_POST['sName'];
$newUrl = $_POST['sURL'];
$newRate = $_POST['sRate'];
$newEmail = $_POST['sEmail'];
$reason = $_POST['sReason'];
$q = "update wcddl_sites set name='$newName',url='$newUrl',rate='$newRate',email='$newEmail' WHERE id='". mysql_real_escape_string($sid) ."'";
echo "query is : $q";
mysql_query($q);
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Latest Post not updating for me
By Ifirst in forum Feedback and SuggestionsReplies: 3Last Post: 27th Oct 2012, 09:41 PM -
Updating Wordpress
By MightyMike in forum WordpressReplies: 3Last Post: 16th May 2012, 06:24 PM -
google has started updating PR
By pompom in forum General DiscussionReplies: 6Last Post: 8th Nov 2011, 04:33 PM -
WWW A Record isn't updating
By BounceR in forum Webmaster DiscussionReplies: 5Last Post: 16th Mar 2011, 09:50 AM -
Error when updating avatars
By system32 in forum vBulletinReplies: 13Last Post: 27th Jul 2009, 09:07 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...