Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 84
10 members and 74 guests
achtso4illesttj, advcm5ber9czjlt, ass6reetmanageb, ink9foxcar3qcrt, lawn22ev12, lg46bzptptv, oca2slanationat, res7zeptaurants, ssefqarchmar2dx, webxhsitezb7cdp
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > General > Site design

Reply
 
LinkBack Thread Tools Display Modes
Need help with PHP/MYSQL
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 2
Join Date: Aug 2004
Need help with PHP/MYSQL - 08-17-2004, 06:07 PM

I am having a problem getting php to change mysql database values. It can query the database fine but it won't change the database. What am I doing wrong?

I have tried many different methods of sql= UPDATE ****** none of which work including the sql = "UPDATE nuke_users SET user_sig = 2 WHERE username= '/Akadios/'";

That MySQL administrator Welcome to phpMyAdmin 2.5.3 told me to put in simply to change usersig to 2 (note that the script UPDATE nuke_users SET user_sig='2' WHERE username = 'Akadios' directly put into MySQL functions correctly and when asked to make php code phpMyAdmin makes the code I tried which doesn't Anyways I have included all the SQL related code and left out other parts.


Code:
<?php ?>
<html>
<head><title>PHPBB Signature Generator by vanurangers.com</title></head>
<body>
<center>
<h3>PHPBB Signature Generator</h3>
</center><left>


vanurangers.com &copy; 2004




<?php
//var name parsing

$username = $_GET['username'];
$password = $_GET['password'];

$new_pass = md5($password);
$host = "localhost";
$dbusername = "********";
$dbpassword = "********";
$database = "vanurangers_com_-_phpnuke";
$server = mysql_connect($host, $dbusername, $dbpassword) or die(mysql_error());
$connection = mysql_select_db($database, $server);

$sql = "SELECT user_password FROM nuke_users WHERE username = '$username'";
          $result = (mysql_query($sql));

$storedpass= (mysql_result($result, 0));
        if ( $storedpass != $new_pass)
                 {
                          echo "incorrect password";
                          exit;
                  }            else

//rest of code here that fills $signature which is what I
// eventually when it works to go into the signature. (replacing all the old
//data in the user_sig.

<?
sql = "UPDATE nuke_users SET user_sig = 2 WHERE username= '/Akadios/'";

 mysql_close($server);
?>
</html>
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Moderator
 
Status: Offline
Posts: 957
Join Date: Nov 2002
Location: Belgium
08-18-2004, 02:25 AM

replace this
Code:
sql = "UPDATE nuke_users SET user_sig = 2 WHERE username= '/Akadios/'";
with this
Code:
$sql = "UPDATE nuke_users SET user_sig = 2 WHERE username= 'Akadios'";
mysql_query($sql);
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 2
Join Date: Aug 2004
08-19-2004, 11:44 AM

Thank you that worked 8)
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserId Maxed out in MySQL Kilch Open topics 0 03-10-2006 12:59 PM
There seems to be a problem with the MySQL server, sorry for unno Nuke 7.x - General 8 03-09-2006 04:34 PM
Mysql connect problem Killalla Nuke 6.5 to 6.9 - General 0 10-29-2005 12:41 PM
Upgrade Issues on MySQL liliputt Nuke 7.x - General 2 06-22-2005 06:52 AM
I really need help with PHP and MySQL jasonmkiggy Site design 4 10-01-2004 02:19 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31