How can I use a variable in a MySQL select statement?
Code:
$serverid = $_SESSION['server_id'];
$sql = "SELECT * FROM servers WHERE server_id = '$serverid'";
ThePMTeam 0 Newbie Poster
rproffitt 2,662 "Nothing to see here." Moderator
AleMonteiro 238 Can I pick my title?
FarrisFahad 103 Junior Poster Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.