01-26-2019, 01:17 PM
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
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