ronnie88 Posted June 13, 2010 Share Posted June 13, 2010 <?php //include db connect include 'db.php'; $url = '<img src="http://www.versionxgaming.com/forum/images/ranks/$lastname"/>'; $userid = $_POST['userid']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $username = $_POST['username']; // Update data $update = mysql_query("UPDATE `users` SET members = '$firstname', rank = '$url', xfire = '$username' WHERE userid = '$userid'") or die ('Error Updating Data! <br />' .mysql_error()); echo "Update successful $firstname has been updated"; ?> Okay here it goes the url variable works fine but doesn't post the $lastname variable how do I make it post last name variable... Link to comment https://forums.phpfreaks.com/topic/204640-how-do-i-pull-this-off/ Share on other sites More sharing options...
ronnie88 Posted June 13, 2010 Author Share Posted June 13, 2010 Nevermind I got it used this instead <?php //include db connect include 'db.php'; $userid = $_POST['userid']; $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $username = $_POST['username']; $url = '<img src="http://www.versionxgaming.com/forum/images/ranks/'; $end = '"/>'; // Update data $update = mysql_query("UPDATE `users` SET members = '$firstname', rank = '$url$lastname$end', xfire = '$username' WHERE userid = '$userid'") or die ('Error Updating Data! <br />' .mysql_error()); echo "Update successfull $firstname has been updated"; ?> thanks though Link to comment https://forums.phpfreaks.com/topic/204640-how-do-i-pull-this-off/#findComment-1071421 Share on other sites More sharing options...
Daniel0 Posted June 13, 2010 Share Posted June 13, 2010 You might also want to lookup SQL injections and XSS so you can close those security holes. They're mentioned in this tutorial: http://www.phpfreaks.com/tutorial/php-security Link to comment https://forums.phpfreaks.com/topic/204640-how-do-i-pull-this-off/#findComment-1071424 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.