Best Blackhat Forum

Full Version: little infor please php msq need a little help first question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
think the code below is correct
my final output is i want to echo $luckycashvalue into a lable
i just include echo $luckycashvalue anywhere i want to display the value
can i just add

$luckycashvalue = "SELECT cash FROM users WHERE userId=$username";
echo $luckycashvalue
will i have to open and close a connection with each command thanks


can i predefine $luckycashvalue to <[{cash}]>
<[{cash}]>=echo $luckycashvalue
so where ever i put <[{cash}]> it will echo $luckycashvalue anywhere in the script or


<?php
$shostname = "localhost"; //svet ip machine
$masterlogin = "masterlogin"; //master sql username
$masterpassword = "master password"; //master
$databasegames = "games"; //gameslobbydatabase
?>
<?php
$luckycon = @mysqli_connect('$shostname', '$masterlogin', '', '$databasegames');
if (!$luckycon) {
echo "Error: "crypto . mysqli_connect_error();
exit();
}
$luckycashvalue = "SELECT cash FROM users WHERE userId=$username";

echo $luckycashvalue
>


any help would be awesome
Reference URL's