Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Tutorials
[PHP] How to use MySQLi
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="brsy" data-source="post: 56886" data-attributes="member: 2912"><p>Well I have a quick question. I saw you had the following code above in your OP.</p><p>[PHP]$user = 'RastaLulz';</p><p> </p><p>//update info</p><p>$db->query("UPDATE users SET email = 'booty@lulz.com' WHERE name = '".$username."'");</p><p> </p><p>//get info</p><p>$getUserInfo = $db->query("SELECT * FROM users WHERE name = '".$username."'");[/PHP]</p><p>Shouldn't it be:</p><p>[PHP]$username = 'RastaLulz';</p><p> </p><p>//update info</p><p>$db->query("UPDATE users SET email = 'booty@lulz.com' WHERE name = '".$username."'");</p><p> </p><p>//get info</p><p>$getUserInfo = $db->query("SELECT * FROM users WHERE name = '".$username."'");[/PHP]</p><p>?? I simply changed the variable from $user to $username because in your query you are using the variable $username</p><p> </p><p>I am just assuming, as I have no MySQLi knowledge but I am just wondering.</p></blockquote><p></p>
[QUOTE="brsy, post: 56886, member: 2912"] Well I have a quick question. I saw you had the following code above in your OP. [PHP]$user = 'RastaLulz'; //update info $db->query("UPDATE users SET email = 'booty@lulz.com' WHERE name = '".$username."'"); //get info $getUserInfo = $db->query("SELECT * FROM users WHERE name = '".$username."'");[/PHP] Shouldn't it be: [PHP]$username = 'RastaLulz'; //update info $db->query("UPDATE users SET email = 'booty@lulz.com' WHERE name = '".$username."'"); //get info $getUserInfo = $db->query("SELECT * FROM users WHERE name = '".$username."'");[/PHP] ?? I simply changed the variable from $user to $username because in your query you are using the variable $username I am just assuming, as I have no MySQLi knowledge but I am just wondering. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Tutorials
[PHP] How to use MySQLi
Top